langgraph-api 0.4.41__py3-none-any.whl → 0.4.43__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.41"
1
+ __version__ = "0.4.43"
langgraph_api/metadata.py CHANGED
@@ -2,6 +2,7 @@ import asyncio
2
2
  import os
3
3
  import uuid
4
4
  from datetime import UTC, datetime
5
+ from typing import Any
5
6
 
6
7
  import langgraph.version
7
8
  import orjson
@@ -123,6 +124,7 @@ async def metadata_loop() -> None:
123
124
  __version__ = None
124
125
  if not LANGGRAPH_CLOUD_LICENSE_KEY and not LANGSMITH_CONTROL_PLANE_API_KEY:
125
126
  return
127
+ lg_version = langgraph.version.__version__
126
128
 
127
129
  if (
128
130
  LANGGRAPH_CLOUD_LICENSE_KEY
@@ -135,6 +137,25 @@ async def metadata_loop() -> None:
135
137
  logger.info("Starting metadata loop")
136
138
 
137
139
  global RUN_COUNTER, NODE_COUNTER, FROM_TIMESTAMP
140
+ base_tags = _ensure_strings(
141
+ # Tag values must be strings.
142
+ {
143
+ "langgraph.python.version": lg_version,
144
+ "langgraph_api.version": __version__ or "",
145
+ "langgraph.platform.revision": REVISION or "",
146
+ "langgraph.platform.variant": VARIANT or "",
147
+ "langgraph.platform.host": HOST,
148
+ "langgraph.platform.tenant_id": TENANT_ID or "",
149
+ "langgraph.platform.project_id": PROJECT_ID or "",
150
+ "langgraph.platform.plan": PLAN,
151
+ # user app features
152
+ "user_app.uses_indexing": USES_INDEXING or "",
153
+ "user_app.uses_custom_app": USES_CUSTOM_APP or "",
154
+ "user_app.uses_custom_auth": USES_CUSTOM_AUTH or "",
155
+ "user_app.uses_thread_ttl": USES_THREAD_TTL or "",
156
+ "user_app.uses_store_ttl": USES_STORE_TTL or "",
157
+ }
158
+ )
138
159
  while True:
139
160
  # because we always read and write from coroutines in main thread
140
161
  # we don't need a lock as long as there's no awaits in this block
@@ -150,27 +171,10 @@ async def metadata_loop() -> None:
150
171
  base_payload = {
151
172
  "from_timestamp": from_timestamp,
152
173
  "to_timestamp": to_timestamp,
153
- "tags": {
154
- # Tag values must be strings.
155
- "langgraph.python.version": langgraph.version.__version__,
156
- "langgraph_api.version": __version__ or "",
157
- "langgraph.platform.revision": REVISION or "",
158
- "langgraph.platform.variant": VARIANT or "",
159
- "langgraph.platform.host": HOST,
160
- "langgraph.platform.tenant_id": TENANT_ID or "",
161
- "langgraph.platform.project_id": PROJECT_ID or "",
162
- "langgraph.platform.plan": PLAN,
163
- # user app features
164
- "user_app.uses_indexing": str(USES_INDEXING or ""),
165
- "user_app.uses_custom_app": str(USES_CUSTOM_APP or ""),
166
- "user_app.uses_custom_auth": str(USES_CUSTOM_AUTH),
167
- "user_app.uses_thread_ttl": str(USES_THREAD_TTL),
168
- "user_app.uses_store_ttl": str(USES_STORE_TTL),
169
- **usage_tags,
170
- },
174
+ "tags": base_tags | _ensure_strings(usage_tags),
171
175
  "measures": {
172
- "langgraph.platform.runs": runs,
173
- "langgraph.platform.nodes": nodes,
176
+ "langgraph.platform.runs": int(runs),
177
+ "langgraph.platform.nodes": int(nodes),
174
178
  **usage_measures,
175
179
  },
176
180
  "logs": [],
@@ -238,3 +242,7 @@ async def metadata_loop() -> None:
238
242
  )
239
243
 
240
244
  await asyncio.sleep(INTERVAL)
245
+
246
+
247
+ def _ensure_strings(payload: dict[str, Any]) -> dict[str, Any]:
248
+ return {k: "" if v is None else str(v) for k, v in payload.items()}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: langgraph-api
3
- Version: 0.4.41
3
+ Version: 0.4.43
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=zbpn1_WrK8U89bpniqz3GRndm1j8ktchz2WICRCX5uA,23
1
+ langgraph_api/__init__.py,sha256=DOlK1EtIydVko5poWviA6z1DFHpu3tDyzODcF3Bv7Ko,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=Yl2GOChDChsoJcYAk8HhkuR1YKTy8rmbYlS5doqWBpk,19671
@@ -13,7 +13,7 @@ langgraph_api/http.py,sha256=fyK-H-0UfNy_BzuVW3aWWGvhRavmGAVMkDwDArryJ_4,5659
13
13
  langgraph_api/http_metrics.py,sha256=vw3UT9uj9qgxQ_DwJq77HGZqh6LHSjyxylWhqkf2jAw,5095
14
14
  langgraph_api/http_metrics_utils.py,sha256=sjxF7SYGTzY0Wz_G0dzatsYNnWr31S6ujej4JmBG2yo,866
15
15
  langgraph_api/logging.py,sha256=o5iVARqtFYKIcRrK2nk1ymcKEiVYKd_dHmhXLF2khFI,6090
16
- langgraph_api/metadata.py,sha256=Z54bd-uf51qo3KR7_jxETbalp6vD9mWGe-UBeMw1AP4,8412
16
+ langgraph_api/metadata.py,sha256=n_GbdlohRLGQE9KPDzKPAGe6C0eEsvJ-38fzEA8UeTw,8593
17
17
  langgraph_api/patch.py,sha256=J0MmcfpZG15SUVaVcI0Z4x_c0-0rbbT7Pwh9fDAQOpA,1566
18
18
  langgraph_api/queue_entrypoint.py,sha256=z3ZUBl3CpnMm0KFPqCuGvSohPAmYQbhAdyRizSJSClM,8481
19
19
  langgraph_api/route.py,sha256=EBhELuJ1He-ZYcAnR5YTImcIeDtWthDae5CHELBxPkM,5056
@@ -110,8 +110,8 @@ langgraph_runtime/store.py,sha256=7mowndlsIroGHv3NpTSOZDJR0lCuaYMBoTnTrewjslw,11
110
110
  LICENSE,sha256=ZPwVR73Biwm3sK6vR54djCrhaRiM4cAD2zvOQZV8Xis,3859
111
111
  logging.json,sha256=3RNjSADZmDq38eHePMm1CbP6qZ71AmpBtLwCmKU9Zgo,379
112
112
  openapi.json,sha256=Oi2tU1b8PsXb-6XNHafQvcZv934vLNQhBNPYXr9e2nU,172620
113
- langgraph_api-0.4.41.dist-info/METADATA,sha256=aEr_Vld0mKZGoUfpMmrRRLVffEKELTbtSg_5tdEW3Jg,4156
114
- langgraph_api-0.4.41.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
115
- langgraph_api-0.4.41.dist-info/entry_points.txt,sha256=hGedv8n7cgi41PypMfinwS_HfCwA7xJIfS0jAp8htV8,78
116
- langgraph_api-0.4.41.dist-info/licenses/LICENSE,sha256=ZPwVR73Biwm3sK6vR54djCrhaRiM4cAD2zvOQZV8Xis,3859
117
- langgraph_api-0.4.41.dist-info/RECORD,,
113
+ langgraph_api-0.4.43.dist-info/METADATA,sha256=xEFte_xWTVQUvZzU5bDk57wEsy2A62zj0kotHwPHa5Y,4156
114
+ langgraph_api-0.4.43.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
115
+ langgraph_api-0.4.43.dist-info/entry_points.txt,sha256=hGedv8n7cgi41PypMfinwS_HfCwA7xJIfS0jAp8htV8,78
116
+ langgraph_api-0.4.43.dist-info/licenses/LICENSE,sha256=ZPwVR73Biwm3sK6vR54djCrhaRiM4cAD2zvOQZV8Xis,3859
117
+ langgraph_api-0.4.43.dist-info/RECORD,,