#1832·open-swe

图形工厂重新绑定服务器注入的 __pregel_runtime 配置键: 500 AttributeError '_ReadRuntime' 没有 'override' 在 /assistants/{id}/graph 中 (Studio 预览已中断)

作者: cbass-speedbay创建于 2026年7月29日更新于 2026年9月14日

import asyncio from LangGraph.graph import END, START, StateGraph from langgraph_sdk.runtime import _ReadRuntime from typing_extensions import TypedDict class State(TypedDict): x: int async def main() -> None: builder = StateGraph(State) builder.add_node("n", lambda s: s) builder.add_edge(START, "n") builder.add_edge("n", END) # What langgraph_api.graph.get_graph() injects before calling a factory, and what the open-swe factories then re-bind via ".with_config(config)". config = {"configurable": {"__pregel_runtime": _ReadRuntime(access_context="assistants.read", user=None, store=None)}} graph = builder.compile().with_config(config) await graph.aget_graph() # what GET /assistants/{id}/graph does asyncio.run(main()) Output with LangGraph==1.2.8 / LangGraph-sdk==0.4.2 (also 1.2.10 / 0.4.2): File ".../LangGraph/pregel/_algo.py", line 691, in prepare_single_task runtime = runtime.override(AttributeError: '_ReadRuntime' object has no attribute 'override'

内容来源: langchain-ai/open-swe