Home / Function/ after_model() — langchain Function Reference

after_model() — langchain Function Reference

Architecture documentation for the after_model() function in test_framework.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  c480d0fb_b331_c174_d91b_3b7ba5cbce89["after_model()"]
  8c574d58_1f4a_c56d_49f8_177cce7f7bcc["MyMiddleware"]
  c480d0fb_b331_c174_d91b_3b7ba5cbce89 -->|defined in| 8c574d58_1f4a_c56d_49f8_177cce7f7bcc
  83f90d06_bd5d_f90c_8a51_2e1292bd1cfc["after_model()"]
  c480d0fb_b331_c174_d91b_3b7ba5cbce89 -->|calls| 83f90d06_bd5d_f90c_8a51_2e1292bd1cfc
  style c480d0fb_b331_c174_d91b_3b7ba5cbce89 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain_v1/tests/unit_tests/agents/middleware/core/test_framework.py lines 472–474

        def after_model(self, state: AgentState[Any], runtime: Runtime) -> dict[str, Any]:
            assert "jump_to" not in state
            return {"jump_to": "model"}

Domain

Subdomains

Frequently Asked Questions

What does after_model() do?
after_model() is a function in the langchain codebase, defined in libs/langchain_v1/tests/unit_tests/agents/middleware/core/test_framework.py.
Where is after_model() defined?
after_model() is defined in libs/langchain_v1/tests/unit_tests/agents/middleware/core/test_framework.py at line 472.
What does after_model() call?
after_model() calls 1 function(s): after_model.

Analyze Your Own Codebase

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

Try Supermodel Free