Home / Class/ PassthroughMiddleware Class — langchain Architecture

PassthroughMiddleware Class — langchain Architecture

Architecture documentation for the PassthroughMiddleware class in test_wrap_model_call.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  184bc315_78e1_ef49_e909_cd6d563bfcef["PassthroughMiddleware"]
  949c7cf4_56fe_f3b4_cd89_9631a7e9cb1e["AgentMiddleware"]
  184bc315_78e1_ef49_e909_cd6d563bfcef -->|extends| 949c7cf4_56fe_f3b4_cd89_9631a7e9cb1e
  573473e5_eb93_a7d7_84ba_c975071c09af["test_wrap_model_call.py"]
  184bc315_78e1_ef49_e909_cd6d563bfcef -->|defined in| 573473e5_eb93_a7d7_84ba_c975071c09af
  737e5678_a6ae_bf12_55fb_6831bf03e5dd["wrap_model_call()"]
  184bc315_78e1_ef49_e909_cd6d563bfcef -->|method| 737e5678_a6ae_bf12_55fb_6831bf03e5dd

Relationship Graph

Source Code

libs/langchain_v1/tests/unit_tests/agents/middleware/core/test_wrap_model_call.py lines 42–48

        class PassthroughMiddleware(AgentMiddleware):
            def wrap_model_call(
                self,
                request: ModelRequest,
                handler: Callable[[ModelRequest], ModelResponse],
            ) -> ModelCallResult:
                return handler(request)

Extends

Frequently Asked Questions

What is the PassthroughMiddleware class?
PassthroughMiddleware is a class in the langchain codebase, defined in libs/langchain_v1/tests/unit_tests/agents/middleware/core/test_wrap_model_call.py.
Where is PassthroughMiddleware defined?
PassthroughMiddleware is defined in libs/langchain_v1/tests/unit_tests/agents/middleware/core/test_wrap_model_call.py at line 42.
What does PassthroughMiddleware extend?
PassthroughMiddleware extends AgentMiddleware.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free