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