langgraph-api 0.1.18__py3-none-any.whl → 0.1.20__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.1.18"
1
+ __version__ = "0.1.20"
@@ -33,6 +33,7 @@ class LangsmithAuthBackend(AuthenticationBackend):
33
33
  ("X-Api-Key", conn.headers.get("x-api-key")),
34
34
  ("X-Service-Key", conn.headers.get("x-service-key")),
35
35
  ("Cookie", conn.headers.get("cookie")),
36
+ ("X-User-Id", conn.headers.get("x-user-id")),
36
37
  ]
37
38
  if not any(h[1] for h in headers):
38
39
  raise AuthenticationError("Missing authentication headers")
@@ -206,21 +206,8 @@ def get_configurable_headers(headers: dict[str, str]) -> dict[str, str]:
206
206
  configurable = {}
207
207
  include_patterns, exclude_patterns = get_header_patterns()
208
208
  for key, value in headers.items():
209
- if include_patterns and not any(
210
- pattern.match(key) for pattern in include_patterns
211
- ):
212
- continue
213
- if exclude_patterns and any(pattern.match(key) for pattern in exclude_patterns):
214
- continue
215
- if key.startswith("x-"):
216
- if key in (
217
- "x-api-key",
218
- "x-tenant-id",
219
- "x-service-key",
220
- ):
221
- continue
222
- configurable[key] = value
223
- elif key == "langsmith-trace":
209
+ # First handle tracing stuff; not configurable
210
+ if key == "langsmith-trace":
224
211
  configurable[key] = value
225
212
  if baggage := headers.get("baggage"):
226
213
  for item in baggage.split(","):
@@ -231,6 +218,23 @@ def get_configurable_headers(headers: dict[str, str]) -> dict[str, str]:
231
218
  configurable[key] = urllib.parse.unquote(value).split(",")
232
219
  elif key == LANGSMITH_PROJECT:
233
220
  configurable[key] = urllib.parse.unquote(value)
221
+ # Then handle overridable behavior
222
+ if exclude_patterns and any(pattern.match(key) for pattern in exclude_patterns):
223
+ continue
224
+ if include_patterns and any(pattern.match(key) for pattern in include_patterns):
225
+ configurable[key] = value
226
+ continue
227
+
228
+ # Then handle default behavior
229
+ if key.startswith("x-"):
230
+ if key in (
231
+ "x-api-key",
232
+ "x-tenant-id",
233
+ "x-service-key",
234
+ ):
235
+ continue
236
+ configurable[key] = value
237
+
234
238
  elif key == "user-agent":
235
239
  configurable[key] = value
236
240
  return configurable
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: langgraph-api
3
- Version: 0.1.18
3
+ Version: 0.1.20
4
4
  Summary:
5
5
  License: Elastic-2.0
6
6
  Author: Nuno Campos
@@ -1,5 +1,5 @@
1
1
  LICENSE,sha256=ZPwVR73Biwm3sK6vR54djCrhaRiM4cAD2zvOQZV8Xis,3859
2
- langgraph_api/__init__.py,sha256=6BiuMUkhwQp6bzUZSF8np8F1NwCltEtK0sPBF__tepU,23
2
+ langgraph_api/__init__.py,sha256=8XalsVoLEfXslFvdtUEmkNOuYShzOzYOcFbgmOz1oSk,23
3
3
  langgraph_api/api/__init__.py,sha256=IKKMrC5gCHTzjprbg8jgZDrAJRuqJfSUgEkZAgh3l-M,5771
4
4
  langgraph_api/api/assistants.py,sha256=6oYFRKlvqheJQGbWjFhQOUnnSbvsbrdMYLRJP7WtSRo,14481
5
5
  langgraph_api/api/mcp.py,sha256=KbR19dtFCpJEiKYj3IfepAuJij8YZVELuVp7JY_yu_o,13754
@@ -13,7 +13,7 @@ langgraph_api/asyncio.py,sha256=h0eZ7aoDGnJpoxnHLZABVlj1jQ78UxjgiHntTmAEWek,8613
13
13
  langgraph_api/auth/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
14
  langgraph_api/auth/custom.py,sha256=QR49PnIfPPQZ6ygWmnMkSuAzgOpBBUbbz5kJ2yVwGmQ,21934
15
15
  langgraph_api/auth/langsmith/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
- langgraph_api/auth/langsmith/backend.py,sha256=6xvxozIDSBTZtMADMqxs4BoI2EVQ4R7bQbsKak8QYCk,2706
16
+ langgraph_api/auth/langsmith/backend.py,sha256=UNsXa1rXuUJy8fdnasdILIWoxWIlHafY03YJChV0USk,2764
17
17
  langgraph_api/auth/langsmith/client.py,sha256=eKchvAom7hdkUXauD8vHNceBDDUijrFgdTV8bKd7x4Q,3998
18
18
  langgraph_api/auth/middleware.py,sha256=jDA4t41DUoAArEY_PNoXesIUBJ0nGhh85QzRdn5EPD0,1916
19
19
  langgraph_api/auth/noop.py,sha256=Bk6Nf3p8D_iMVy_OyfPlyiJp_aEwzL-sHrbxoXpCbac,586
@@ -80,7 +80,7 @@ langgraph_api/middleware/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZ
80
80
  langgraph_api/middleware/http_logger.py,sha256=aj4mdisRobFePkD3Iy6-w_Mujwx4TQRaEhPvSd6HgLk,3284
81
81
  langgraph_api/middleware/private_network.py,sha256=eYgdyU8AzU2XJu362i1L8aSFoQRiV7_aLBPw7_EgeqI,2111
82
82
  langgraph_api/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
83
- langgraph_api/models/run.py,sha256=nriNLvY9ZBmSDYDPQs9W9vj6yYZjRZUl7TtSZ6DaGSs,12944
83
+ langgraph_api/models/run.py,sha256=MAlJMA2V7o3BMoixY5kTXdSrrpZTxcj6qV1TjCETiew,13093
84
84
  langgraph_api/patch.py,sha256=Dgs0PXHytekX4SUL6KsjjN0hHcOtGLvv1GRGbh6PswU,1408
85
85
  langgraph_api/queue_entrypoint.py,sha256=gjtajZfnDXhsi7JElfmkY-p0ENBiKBDJ4Ugiw-exapw,1839
86
86
  langgraph_api/route.py,sha256=fM4qYCGbmH0a3_cV8uKocb1sLklehxO6HhdRXqLK6OM,4421
@@ -101,8 +101,8 @@ langgraph_license/validation.py,sha256=ZKraAVJArAABKqrmHN-EN18ncoNUmRm500Yt1Sc7t
101
101
  langgraph_runtime/__init__.py,sha256=O4GgSmu33c-Pr8Xzxj_brcK5vkm70iNTcyxEjICFZxA,1075
102
102
  logging.json,sha256=3RNjSADZmDq38eHePMm1CbP6qZ71AmpBtLwCmKU9Zgo,379
103
103
  openapi.json,sha256=cjlQFtrH7TwXQ9GNe1jy2iBRhae_F6inFZhsaCQidBc,132770
104
- langgraph_api-0.1.18.dist-info/LICENSE,sha256=ZPwVR73Biwm3sK6vR54djCrhaRiM4cAD2zvOQZV8Xis,3859
105
- langgraph_api-0.1.18.dist-info/METADATA,sha256=cwXR7lMnah_lJRlXq3hMxHQquSCsia8P6eH07Y56AzA,4236
106
- langgraph_api-0.1.18.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
107
- langgraph_api-0.1.18.dist-info/entry_points.txt,sha256=3EYLgj89DfzqJHHYGxPH4A_fEtClvlRbWRUHaXO7hj4,77
108
- langgraph_api-0.1.18.dist-info/RECORD,,
104
+ langgraph_api-0.1.20.dist-info/LICENSE,sha256=ZPwVR73Biwm3sK6vR54djCrhaRiM4cAD2zvOQZV8Xis,3859
105
+ langgraph_api-0.1.20.dist-info/METADATA,sha256=VmXrHY0G8gs4WuohLP35c41gUw8MmQduRAfDsRaliK0,4236
106
+ langgraph_api-0.1.20.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
107
+ langgraph_api-0.1.20.dist-info/entry_points.txt,sha256=3EYLgj89DfzqJHHYGxPH4A_fEtClvlRbWRUHaXO7hj4,77
108
+ langgraph_api-0.1.20.dist-info/RECORD,,