ShortCircuitMiddleware Class — langchain Architecture
Architecture documentation for the ShortCircuitMiddleware class in test_wrap_model_call_state_update.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 76cc0337_e5ef_c4d1_8746_305e0b05f471["ShortCircuitMiddleware"] 949c7cf4_56fe_f3b4_cd89_9631a7e9cb1e["AgentMiddleware"] 76cc0337_e5ef_c4d1_8746_305e0b05f471 -->|extends| 949c7cf4_56fe_f3b4_cd89_9631a7e9cb1e 08361e76_a995_1e57_f200_e292474e2f00["test_wrap_model_call_state_update.py"] 76cc0337_e5ef_c4d1_8746_305e0b05f471 -->|defined in| 08361e76_a995_1e57_f200_e292474e2f00 40cfe2a7_d707_a8b4_593a_22534da5408a["wrap_model_call()"] 76cc0337_e5ef_c4d1_8746_305e0b05f471 -->|method| 40cfe2a7_d707_a8b4_593a_22534da5408a
Relationship Graph
Source Code
libs/langchain_v1/tests/unit_tests/agents/middleware/core/test_wrap_model_call_state_update.py lines 223–229
class ShortCircuitMiddleware(AgentMiddleware):
def wrap_model_call(
self,
request: ModelRequest,
handler: Callable[[ModelRequest], ModelResponse],
) -> AIMessage:
return AIMessage(content="Short-circuited")
Defined In
Extends
Source
Frequently Asked Questions
What is the ShortCircuitMiddleware class?
ShortCircuitMiddleware 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 ShortCircuitMiddleware defined?
ShortCircuitMiddleware is defined in libs/langchain_v1/tests/unit_tests/agents/middleware/core/test_wrap_model_call_state_update.py at line 223.
What does ShortCircuitMiddleware extend?
ShortCircuitMiddleware extends AgentMiddleware.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free