langgraph-api 0.0.25__py3-none-any.whl → 0.0.26__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.

@@ -78,6 +78,7 @@ def load_custom_app(app_import: str) -> Starlette | None:
78
78
  logger.info(f"Loading custom app from {app_import}")
79
79
  path, name = app_import.rsplit(":", 1)
80
80
  try:
81
+ os.environ["__LANGGRAPH_DEFER_LOOPBACK_TRANSPORT"] = "true"
81
82
  if os.path.isfile(path) or path.endswith(".py"):
82
83
  # Import from file path using a unique module name.
83
84
  spec = importlib.util.spec_from_file_location("user_router_module", path)
@@ -100,6 +101,8 @@ def load_custom_app(app_import: str) -> Starlette | None:
100
101
  raise ImportError(f"Failed to import app module '{path}'") from e
101
102
  except AttributeError as e:
102
103
  raise AttributeError(f"App '{name}' not found in module '{path}'") from e
104
+ finally:
105
+ os.environ.pop("__LANGGRAPH_DEFER_LOOPBACK_TRANSPORT", None)
103
106
  return user_router
104
107
 
105
108
 
langgraph_api/server.py CHANGED
@@ -28,6 +28,7 @@ from langgraph_api.middleware.private_network import PrivateNetworkMiddleware
28
28
  from langgraph_api.utils import SchemaGenerator
29
29
  from langgraph_license.middleware import LicenseValidationMiddleware
30
30
  from langgraph_storage.retry import OVERLOADED_EXCEPTIONS
31
+ from langgraph_sdk.client import configure_loopback_transports
31
32
 
32
33
  logging.captureWarnings(True)
33
34
  logger = structlog.stdlib.get_logger(__name__)
@@ -127,7 +128,9 @@ if user_router:
127
128
  app.exception_handlers[k] = v
128
129
  else:
129
130
  logger.debug(f"Overriding exception handler for {k}")
130
-
131
+ # If the user creates a loopback client with `get_client() (no url)
132
+ # this will update the http transport to connect to the right app
133
+ configure_loopback_transports(app)
131
134
 
132
135
  else:
133
136
  # It's a regular starlette app
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: langgraph-api
3
- Version: 0.0.25
3
+ Version: 0.0.26
4
4
  Summary:
5
5
  License: Elastic-2.0
6
6
  Author: Nuno Campos
@@ -16,7 +16,7 @@ Requires-Dist: jsonschema-rs (>=0.25.0,<0.26.0)
16
16
  Requires-Dist: langchain-core (>=0.2.38,<0.4.0)
17
17
  Requires-Dist: langgraph (>=0.2.56,<0.3.0)
18
18
  Requires-Dist: langgraph-checkpoint (>=2.0.15,<3.0)
19
- Requires-Dist: langgraph-sdk (>=0.1.51,<0.2.0)
19
+ Requires-Dist: langgraph-sdk (>=0.1.53,<0.2.0)
20
20
  Requires-Dist: langsmith (>=0.1.63,<0.4.0)
21
21
  Requires-Dist: orjson (>=3.10.1)
22
22
  Requires-Dist: pyjwt (>=2.9.0,<3.0.0)
@@ -1,6 +1,6 @@
1
1
  LICENSE,sha256=ZPwVR73Biwm3sK6vR54djCrhaRiM4cAD2zvOQZV8Xis,3859
2
2
  langgraph_api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
- langgraph_api/api/__init__.py,sha256=2RJ2tFsZ_l6PnEd9UOL0LbtNfd0H6QziC3AA-L_OQVQ,4812
3
+ langgraph_api/api/__init__.py,sha256=WBw9xUm5JkvgWVbwHs8vhR5jOf3_zhMjktB96zKNI58,4962
4
4
  langgraph_api/api/assistants.py,sha256=9wngelDC9vnSs2vYGTHDSCLf5KNds-6mgP1BWnfoY2M,12865
5
5
  langgraph_api/api/meta.py,sha256=hueasWpTDQ6xYLo9Bzt2jhNH8XQRzreH8FTeFfnRoxQ,2700
6
6
  langgraph_api/api/openapi.py,sha256=f9gfmWN2AMKNUpLCpSgZuw_aeOF9jCXPdOtFT5PaTWM,10960
@@ -71,7 +71,7 @@ langgraph_api/queue.py,sha256=2sw9HB2cYVBhYUNA3F7lcJAgRjhQJXhA_HNGhFt2BW8,14508
71
71
  langgraph_api/route.py,sha256=fM4qYCGbmH0a3_cV8uKocb1sLklehxO6HhdRXqLK6OM,4421
72
72
  langgraph_api/schema.py,sha256=mgam5lpuqZnrNWMm_0nQ95683gCnCvQNRKbiuFj7z8Q,5310
73
73
  langgraph_api/serde.py,sha256=VoJ7Z1IuqrQGXFzEP1qijAITtWCrmjtVqlCRuScjXJI,3533
74
- langgraph_api/server.py,sha256=hrR39cIYZ13nUXWvOKHdhuASSdA4R6JOFu6LJUJ7t7I,4324
74
+ langgraph_api/server.py,sha256=CiNK327zTsEpoVGeJK1JOtZHvOBYRoz0CnBTZUmsC7c,4567
75
75
  langgraph_api/sse.py,sha256=2wNodCOP2eg7a9mpSu0S3FQ0CHk2BBV_vv0UtIgJIcc,4034
76
76
  langgraph_api/state.py,sha256=8jx4IoTCOjTJuwzuXJKKFwo1VseHjNnw_CCq4x1SW14,2284
77
77
  langgraph_api/stream.py,sha256=MUYYNgwtLs1Mhq1dm12zda7j8uFYir49umigK6CnuXU,11944
@@ -90,8 +90,8 @@ langgraph_storage/store.py,sha256=D-p3cWc_umamkKp-6Cz3cAriSACpvM5nxUIvND6PuxE,27
90
90
  langgraph_storage/ttl_dict.py,sha256=FlpEY8EANeXWKo_G5nmIotPquABZGyIJyk6HD9u6vqY,1533
91
91
  logging.json,sha256=3RNjSADZmDq38eHePMm1CbP6qZ71AmpBtLwCmKU9Zgo,379
92
92
  openapi.json,sha256=DqXpD6JD4tvSOhUgDN_6f919F8YmOSAK4CsGi1NDoiI,125252
93
- langgraph_api-0.0.25.dist-info/LICENSE,sha256=ZPwVR73Biwm3sK6vR54djCrhaRiM4cAD2zvOQZV8Xis,3859
94
- langgraph_api-0.0.25.dist-info/METADATA,sha256=fDPk6UfSu7A2T8IAwOrTP424v7TtZkAdM_L2Q3E9BTk,4039
95
- langgraph_api-0.0.25.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
96
- langgraph_api-0.0.25.dist-info/entry_points.txt,sha256=3EYLgj89DfzqJHHYGxPH4A_fEtClvlRbWRUHaXO7hj4,77
97
- langgraph_api-0.0.25.dist-info/RECORD,,
93
+ langgraph_api-0.0.26.dist-info/LICENSE,sha256=ZPwVR73Biwm3sK6vR54djCrhaRiM4cAD2zvOQZV8Xis,3859
94
+ langgraph_api-0.0.26.dist-info/METADATA,sha256=VFGg6OyMT4eyXHQgQiRPD9aWiHWlAjIKqTqQCX34CSc,4039
95
+ langgraph_api-0.0.26.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
96
+ langgraph_api-0.0.26.dist-info/entry_points.txt,sha256=3EYLgj89DfzqJHHYGxPH4A_fEtClvlRbWRUHaXO7hj4,77
97
+ langgraph_api-0.0.26.dist-info/RECORD,,