OldStyleAsyncMiddleware Class — langchain Architecture
Architecture documentation for the OldStyleAsyncMiddleware class in test_middleware_backwards_compat.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD eea86baf_3982_b598_bf6c_bb3a6f1d43a6["OldStyleAsyncMiddleware"] 74d2d22f_07ae_c5bb_33c3_7da58e2da5a0["test_middleware_backwards_compat.py"] eea86baf_3982_b598_bf6c_bb3a6f1d43a6 -->|defined in| 74d2d22f_07ae_c5bb_33c3_7da58e2da5a0 47dc9e21_f0bf_5466_2308_34c1d2685a53["awrap_model_call()"] eea86baf_3982_b598_bf6c_bb3a6f1d43a6 -->|method| 47dc9e21_f0bf_5466_2308_34c1d2685a53
Relationship Graph
Source Code
libs/langchain_v1/tests/unit_tests/agents/middleware_typing/test_middleware_backwards_compat.py lines 115–123
class OldStyleAsyncMiddleware(AgentMiddleware[AgentState[Any], ContextT]):
"""Async middleware with old 2-param pattern."""
async def awrap_model_call(
self,
request: ModelRequest[ContextT],
handler: Callable[[ModelRequest[ContextT]], Awaitable[ModelResponse]],
) -> ModelResponse:
return await handler(request)
Defined In
Source
Frequently Asked Questions
What is the OldStyleAsyncMiddleware class?
OldStyleAsyncMiddleware is a class in the langchain codebase, defined in libs/langchain_v1/tests/unit_tests/agents/middleware_typing/test_middleware_backwards_compat.py.
Where is OldStyleAsyncMiddleware defined?
OldStyleAsyncMiddleware is defined in libs/langchain_v1/tests/unit_tests/agents/middleware_typing/test_middleware_backwards_compat.py at line 115.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free