AsyncGotoMiddleware Class — langchain Architecture
Architecture documentation for the AsyncGotoMiddleware class in test_wrap_model_call_state_update.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 9643eaa1_3640_6a5a_4803_13587cef9e19["AsyncGotoMiddleware"] 949c7cf4_56fe_f3b4_cd89_9631a7e9cb1e["AgentMiddleware"] 9643eaa1_3640_6a5a_4803_13587cef9e19 -->|extends| 949c7cf4_56fe_f3b4_cd89_9631a7e9cb1e 08361e76_a995_1e57_f200_e292474e2f00["test_wrap_model_call_state_update.py"] 9643eaa1_3640_6a5a_4803_13587cef9e19 -->|defined in| 08361e76_a995_1e57_f200_e292474e2f00 a2172c1b_74ae_e40f_604f_4e9b51c38954["awrap_model_call()"] 9643eaa1_3640_6a5a_4803_13587cef9e19 -->|method| a2172c1b_74ae_e40f_604f_4e9b51c38954
Relationship Graph
Source Code
libs/langchain_v1/tests/unit_tests/agents/middleware/core/test_wrap_model_call_state_update.py lines 809–819
class AsyncGotoMiddleware(AgentMiddleware):
async def awrap_model_call(
self,
request: ModelRequest,
handler: Callable[[ModelRequest], Awaitable[ModelResponse]],
) -> ExtendedModelResponse:
response = await handler(request)
return ExtendedModelResponse(
model_response=response,
command=Command(goto="tools"),
)
Defined In
Extends
Source
Frequently Asked Questions
What is the AsyncGotoMiddleware class?
AsyncGotoMiddleware is a class in the langchain codebase, defined in libs/langchain_v1/tests/unit_tests/agents/middleware/core/test_wrap_model_call_state_update.py.
Where is AsyncGotoMiddleware defined?
AsyncGotoMiddleware is defined in libs/langchain_v1/tests/unit_tests/agents/middleware/core/test_wrap_model_call_state_update.py at line 809.
What does AsyncGotoMiddleware extend?
AsyncGotoMiddleware extends AgentMiddleware.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free