langgraph-api 0.2.30__tar.gz → 0.2.32__tar.gz
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-0.2.30 → langgraph_api-0.2.32}/PKG-INFO +1 -1
- langgraph_api-0.2.32/langgraph_api/__init__.py +1 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/js/build.mts +36 -19
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/js/package.json +2 -2
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/js/yarn.lock +9 -9
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/metadata.py +16 -28
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/stream.py +5 -15
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/worker.py +1 -1
- langgraph_api-0.2.30/langgraph_api/__init__.py +0 -1
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/.gitignore +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/LICENSE +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/Makefile +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/README.md +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/benchmark/weather.js +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/constraints.txt +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/forbidden.txt +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/healthcheck.py +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/api/__init__.py +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/api/assistants.py +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/api/mcp.py +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/api/meta.py +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/api/openapi.py +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/api/runs.py +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/api/store.py +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/api/threads.py +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/api/ui.py +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/asgi_transport.py +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/asyncio.py +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/auth/__init__.py +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/auth/custom.py +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/auth/langsmith/__init__.py +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/auth/langsmith/backend.py +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/auth/langsmith/client.py +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/auth/middleware.py +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/auth/noop.py +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/auth/studio_user.py +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/cli.py +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/command.py +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/config.py +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/cron_scheduler.py +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/errors.py +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/graph.py +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/http.py +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/js/.gitignore +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/js/.prettierrc +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/js/__init__.py +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/js/base.py +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/js/client.http.mts +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/js/client.mts +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/js/errors.py +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/js/global.d.ts +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/js/remote.py +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/js/schema.py +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/js/src/graph.mts +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/js/src/load.hooks.mjs +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/js/src/preload.mjs +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/js/src/utils/files.mts +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/js/src/utils/importMap.mts +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/js/src/utils/pythonSchemas.mts +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/js/src/utils/serde.mts +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/js/sse.py +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/js/tsconfig.json +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/js/ui.py +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/logging.py +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/middleware/__init__.py +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/middleware/http_logger.py +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/middleware/private_network.py +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/middleware/request_id.py +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/models/__init__.py +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/models/run.py +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/patch.py +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/queue_entrypoint.py +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/route.py +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/schema.py +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/serde.py +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/server.py +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/sse.py +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/state.py +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/store.py +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/thread_ttl.py +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/tunneling/cloudflare.py +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/utils.py +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/validation.py +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_api/webhook.py +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_license/__init__.py +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_license/validation.py +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/langgraph_runtime/__init__.py +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/logging.json +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/openapi.json +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/pyproject.toml +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/scripts/create_license.py +0 -0
- {langgraph_api-0.2.30 → langgraph_api-0.2.32}/uv.lock +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.2.32"
|
|
@@ -7,7 +7,10 @@ import * as path from "node:path";
|
|
|
7
7
|
import { type GraphSchema, resolveGraph } from "./src/graph.mts";
|
|
8
8
|
import { build } from "@langchain/langgraph-ui";
|
|
9
9
|
import { checkLangGraphSemver } from "@langchain/langgraph-api/semver";
|
|
10
|
-
import {
|
|
10
|
+
import {
|
|
11
|
+
getStaticGraphSchema,
|
|
12
|
+
GraphSpec,
|
|
13
|
+
} from "@langchain/langgraph-api/schema";
|
|
11
14
|
import { filterValidExportPath } from "./src/utils/files.mts";
|
|
12
15
|
|
|
13
16
|
const __dirname = new URL(".", import.meta.url).pathname;
|
|
@@ -17,7 +20,7 @@ async function main() {
|
|
|
17
20
|
z.record(z.string()).parse(JSON.parse(process.env.LANGSERVE_GRAPHS)),
|
|
18
21
|
).filter(([_, spec]) => filterValidExportPath(spec));
|
|
19
22
|
|
|
20
|
-
|
|
23
|
+
let GRAPH_SCHEMAS: Record<string, Record<string, GraphSchema> | false> = {};
|
|
21
24
|
|
|
22
25
|
const semver = await checkLangGraphSemver();
|
|
23
26
|
const invalidPackages = semver.filter(
|
|
@@ -42,28 +45,42 @@ async function main() {
|
|
|
42
45
|
|
|
43
46
|
let failed = false;
|
|
44
47
|
try {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
try {
|
|
53
|
-
console.info(`[${graphId}]: Extracting schema`);
|
|
54
|
-
GRAPH_SCHEMAS[graphId] = await getStaticGraphSchema(spec, {
|
|
55
|
-
timeoutMs: 120_000,
|
|
48
|
+
const resolveSpecs = Object.fromEntries<GraphSpec>(
|
|
49
|
+
await Promise.all(
|
|
50
|
+
specs.map(async ([graphId, rawSpec]) => {
|
|
51
|
+
console.info(`[${graphId}]: Checking for source file existence`);
|
|
52
|
+
const { resolved, ...spec } = await resolveGraph(rawSpec, {
|
|
53
|
+
onlyFilePresence: true,
|
|
56
54
|
});
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}),
|
|
55
|
+
|
|
56
|
+
return [graphId, spec] as [string, GraphSpec];
|
|
57
|
+
}),
|
|
58
|
+
),
|
|
62
59
|
);
|
|
63
60
|
|
|
61
|
+
try {
|
|
62
|
+
console.info("Extracting schemas");
|
|
63
|
+
GRAPH_SCHEMAS = await getStaticGraphSchema(resolveSpecs, {
|
|
64
|
+
timeoutMs: 120_000,
|
|
65
|
+
});
|
|
66
|
+
} catch (error) {
|
|
67
|
+
console.error(`Error extracting schema: ${error}`);
|
|
68
|
+
}
|
|
69
|
+
|
|
64
70
|
await fs.writeFile(
|
|
65
71
|
path.resolve(__dirname, "client.schemas.json"),
|
|
66
|
-
JSON.stringify(
|
|
72
|
+
JSON.stringify(
|
|
73
|
+
Object.fromEntries(
|
|
74
|
+
specs.map(([graphId]) => {
|
|
75
|
+
const valid = GRAPH_SCHEMAS[graphId];
|
|
76
|
+
if (valid == null || Object.values(valid).every((x) => x == null)) {
|
|
77
|
+
return [graphId, false];
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
return [graphId, valid];
|
|
81
|
+
}),
|
|
82
|
+
),
|
|
83
|
+
),
|
|
67
84
|
{ encoding: "utf-8" },
|
|
68
85
|
);
|
|
69
86
|
} catch (error) {
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"undici": "^6.21.1",
|
|
25
25
|
"uuid": "^10.0.0",
|
|
26
26
|
"winston": "^3.17.0",
|
|
27
|
-
"@langchain/langgraph-api": "~0.0.
|
|
28
|
-
"@langchain/langgraph-ui": "~0.0.
|
|
27
|
+
"@langchain/langgraph-api": "~0.0.37",
|
|
28
|
+
"@langchain/langgraph-ui": "~0.0.37",
|
|
29
29
|
"zod": "^3.23.8"
|
|
30
30
|
},
|
|
31
31
|
"resolutions": {
|
|
@@ -203,15 +203,15 @@
|
|
|
203
203
|
zod "^3.22.4"
|
|
204
204
|
zod-to-json-schema "^3.22.3"
|
|
205
205
|
|
|
206
|
-
"@langchain/langgraph-api@~0.0.
|
|
207
|
-
version "0.0.
|
|
208
|
-
resolved "https://registry.yarnpkg.com/@langchain/langgraph-api/-/langgraph-api-0.0.
|
|
209
|
-
integrity sha512-
|
|
206
|
+
"@langchain/langgraph-api@~0.0.37":
|
|
207
|
+
version "0.0.37"
|
|
208
|
+
resolved "https://registry.yarnpkg.com/@langchain/langgraph-api/-/langgraph-api-0.0.37.tgz#52b3a62ac56dc56e239b76953ccc5b42a5aa1396"
|
|
209
|
+
integrity sha512-0mMmjA0KSYx/oKm6a+KSjWj7hneWsGlTDuwIaEnpauFLo5FCx3bZ8yQSPNFprvgHgJkxYWLjnVuXS+y/V1kLqg==
|
|
210
210
|
dependencies:
|
|
211
211
|
"@babel/code-frame" "^7.26.2"
|
|
212
212
|
"@hono/node-server" "^1.12.0"
|
|
213
213
|
"@hono/zod-validator" "^0.2.2"
|
|
214
|
-
"@langchain/langgraph-ui" "0.0.
|
|
214
|
+
"@langchain/langgraph-ui" "0.0.37"
|
|
215
215
|
"@types/json-schema" "^7.0.15"
|
|
216
216
|
"@typescript/vfs" "^1.6.0"
|
|
217
217
|
dedent "^1.5.3"
|
|
@@ -256,10 +256,10 @@
|
|
|
256
256
|
p-retry "4"
|
|
257
257
|
uuid "^9.0.0"
|
|
258
258
|
|
|
259
|
-
"@langchain/langgraph-ui@0.0.
|
|
260
|
-
version "0.0.
|
|
261
|
-
resolved "https://registry.yarnpkg.com/@langchain/langgraph-ui/-/langgraph-ui-0.0.
|
|
262
|
-
integrity sha512-
|
|
259
|
+
"@langchain/langgraph-ui@0.0.37", "@langchain/langgraph-ui@~0.0.37":
|
|
260
|
+
version "0.0.37"
|
|
261
|
+
resolved "https://registry.yarnpkg.com/@langchain/langgraph-ui/-/langgraph-ui-0.0.37.tgz#02bfdcc6ef1f518d3810afe298d6862d82100c58"
|
|
262
|
+
integrity sha512-eHsm+bjxXYzHsWa3WjlYiHd7a5PMaLgH1U0B5Ox+p43QnCE+mUCm82dWvvvXQ+FO/RktPk8kjbswwK/y/0Zk5A==
|
|
263
263
|
dependencies:
|
|
264
264
|
"@commander-js/extra-typings" "^13.0.0"
|
|
265
265
|
commander "^13.0.0"
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import asyncio
|
|
2
2
|
import os
|
|
3
|
-
from collections import defaultdict
|
|
4
3
|
from datetime import UTC, datetime
|
|
5
4
|
|
|
6
5
|
import langgraph.version
|
|
@@ -37,8 +36,8 @@ PLAN = "enterprise" if plus_features_enabled() else "developer"
|
|
|
37
36
|
USER_API_URL = os.getenv("LANGGRAPH_API_URL", None)
|
|
38
37
|
|
|
39
38
|
LOGS: list[dict] = []
|
|
40
|
-
RUN_COUNTER =
|
|
41
|
-
NODE_COUNTER =
|
|
39
|
+
RUN_COUNTER = 0
|
|
40
|
+
NODE_COUNTER = 0
|
|
42
41
|
FROM_TIMESTAMP = datetime.now(UTC).isoformat()
|
|
43
42
|
|
|
44
43
|
if (
|
|
@@ -50,12 +49,14 @@ else:
|
|
|
50
49
|
METADATA_ENDPOINT = "https://api.smith.langchain.com/v1/metadata/submit"
|
|
51
50
|
|
|
52
51
|
|
|
53
|
-
def incr_runs(*,
|
|
54
|
-
RUN_COUNTER
|
|
52
|
+
def incr_runs(*, incr: int = 1) -> None:
|
|
53
|
+
global RUN_COUNTER
|
|
54
|
+
RUN_COUNTER += incr
|
|
55
55
|
|
|
56
56
|
|
|
57
|
-
def incr_nodes(
|
|
58
|
-
NODE_COUNTER
|
|
57
|
+
def incr_nodes(_, *, incr: int = 1) -> None:
|
|
58
|
+
global NODE_COUNTER
|
|
59
|
+
NODE_COUNTER += incr
|
|
59
60
|
|
|
60
61
|
|
|
61
62
|
def append_log(log: dict) -> None:
|
|
@@ -88,23 +89,13 @@ async def metadata_loop() -> None:
|
|
|
88
89
|
# we don't need a lock as long as there's no awaits in this block
|
|
89
90
|
from_timestamp = FROM_TIMESTAMP
|
|
90
91
|
to_timestamp = datetime.now(UTC).isoformat()
|
|
91
|
-
nodes = NODE_COUNTER
|
|
92
|
-
runs = RUN_COUNTER
|
|
92
|
+
nodes = NODE_COUNTER
|
|
93
|
+
runs = RUN_COUNTER
|
|
93
94
|
logs = LOGS.copy()
|
|
94
95
|
LOGS.clear()
|
|
95
|
-
RUN_COUNTER
|
|
96
|
-
NODE_COUNTER
|
|
96
|
+
RUN_COUNTER = 0
|
|
97
|
+
NODE_COUNTER = 0
|
|
97
98
|
FROM_TIMESTAMP = to_timestamp
|
|
98
|
-
graph_measures = {
|
|
99
|
-
f"langgraph.platform.graph_runs.{graph_id}": runs.get(graph_id, 0)
|
|
100
|
-
for graph_id in runs
|
|
101
|
-
}
|
|
102
|
-
graph_measures.update(
|
|
103
|
-
{
|
|
104
|
-
f"langgraph.platform.graph_nodes.{graph_id}": nodes.get(graph_id, 0)
|
|
105
|
-
for graph_id in nodes
|
|
106
|
-
}
|
|
107
|
-
)
|
|
108
99
|
|
|
109
100
|
payload = {
|
|
110
101
|
"license_key": LANGGRAPH_CLOUD_LICENSE_KEY,
|
|
@@ -129,9 +120,8 @@ async def metadata_loop() -> None:
|
|
|
129
120
|
"user_app.uses_store_ttl": str(USES_STORE_TTL),
|
|
130
121
|
},
|
|
131
122
|
"measures": {
|
|
132
|
-
"langgraph.platform.runs":
|
|
133
|
-
"langgraph.platform.nodes":
|
|
134
|
-
**graph_measures,
|
|
123
|
+
"langgraph.platform.runs": runs,
|
|
124
|
+
"langgraph.platform.nodes": nodes,
|
|
135
125
|
},
|
|
136
126
|
"logs": logs,
|
|
137
127
|
}
|
|
@@ -144,10 +134,8 @@ async def metadata_loop() -> None:
|
|
|
144
134
|
)
|
|
145
135
|
except Exception as e:
|
|
146
136
|
# retry on next iteration
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
for graph_id, incr in nodes.items():
|
|
150
|
-
incr_nodes(graph_id=graph_id, incr=incr)
|
|
137
|
+
incr_runs(incr=runs)
|
|
138
|
+
incr_nodes("", incr=nodes)
|
|
151
139
|
FROM_TIMESTAMP = from_timestamp
|
|
152
140
|
await logger.ainfo("Metadata submission skipped.", error=str(e))
|
|
153
141
|
await asyncio.sleep(INTERVAL)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import functools
|
|
2
1
|
from collections.abc import AsyncIterator, Callable
|
|
3
2
|
from contextlib import AsyncExitStack, aclosing
|
|
3
|
+
from functools import lru_cache
|
|
4
4
|
from typing import Any, cast
|
|
5
5
|
|
|
6
6
|
import langgraph.version
|
|
@@ -119,9 +119,7 @@ async def astream_state(
|
|
|
119
119
|
# attach node counter
|
|
120
120
|
is_remote_pregel = isinstance(graph, BaseRemotePregel)
|
|
121
121
|
if not is_remote_pregel:
|
|
122
|
-
config["configurable"]["__pregel_node_finished"] =
|
|
123
|
-
incr_nodes, graph_id=_get_graph_id(run)
|
|
124
|
-
)
|
|
122
|
+
config["configurable"]["__pregel_node_finished"] = incr_nodes
|
|
125
123
|
|
|
126
124
|
# attach run_id to config
|
|
127
125
|
# for attempts beyond the first, use a fresh, unique run_id
|
|
@@ -265,10 +263,10 @@ async def astream_state(
|
|
|
265
263
|
yield mode, chunk
|
|
266
264
|
# --- end shared logic with astream_events ---
|
|
267
265
|
if is_remote_pregel:
|
|
268
|
-
#
|
|
266
|
+
# increament the remote runs
|
|
269
267
|
try:
|
|
270
268
|
nodes_executed = await graph.fetch_nodes_executed()
|
|
271
|
-
incr_nodes(
|
|
269
|
+
incr_nodes(None, incr=nodes_executed)
|
|
272
270
|
except Exception as e:
|
|
273
271
|
logger.warning(f"Failed to fetch nodes executed for {graph.graph_id}: {e}")
|
|
274
272
|
|
|
@@ -303,7 +301,7 @@ def get_feedback_urls(run_id: str, feedback_keys: list[str]) -> dict[str, str]:
|
|
|
303
301
|
return {key: token.url for key, token in zip(feedback_keys, tokens, strict=False)}
|
|
304
302
|
|
|
305
303
|
|
|
306
|
-
@
|
|
304
|
+
@lru_cache(maxsize=1)
|
|
307
305
|
def get_langsmith_client() -> langsmith.Client:
|
|
308
306
|
return langsmith.Client()
|
|
309
307
|
|
|
@@ -317,11 +315,3 @@ EXPECTED_ERRORS = (
|
|
|
317
315
|
ValidationError,
|
|
318
316
|
ValidationErrorLegacy,
|
|
319
317
|
)
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
def _get_graph_id(run: Run) -> str | None:
|
|
323
|
-
try:
|
|
324
|
-
return run["kwargs"]["config"]["configurable"]["graph_id"]
|
|
325
|
-
except Exception:
|
|
326
|
-
logger.info(f"Failed to get graph_id from run {run['run_id']}")
|
|
327
|
-
return "Unknown"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.2.30"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|