test_can_jump_to_with_after_model_decorator() — langchain Function Reference
Architecture documentation for the test_can_jump_to_with_after_model_decorator() function in test_decorators.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 5c88a110_55b4_19f3_cd4f_de7e2c7696da["test_can_jump_to_with_after_model_decorator()"] 85a104a3_11cf_6539_d0c0_ba69a17a41d4["test_decorators.py"] 5c88a110_55b4_19f3_cd4f_de7e2c7696da -->|defined in| 85a104a3_11cf_6539_d0c0_ba69a17a41d4 5db83528_8e08_d7fe_e2fc_f806b038e621["after_model()"] 5c88a110_55b4_19f3_cd4f_de7e2c7696da -->|calls| 5db83528_8e08_d7fe_e2fc_f806b038e621 style 5c88a110_55b4_19f3_cd4f_de7e2c7696da fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain_v1/tests/unit_tests/agents/middleware/core/test_decorators.py lines 228–244
def test_can_jump_to_with_after_model_decorator() -> None:
"""Test can_jump_to parameter used with after_model decorator."""
@after_model(can_jump_to=["model", "end"])
def conditional_after(
state: AgentState[Any], *_args: Any, **_kwargs: Any
) -> dict[str, Any] | None:
if state["messages"][-1].content == "retry":
return {"jump_to": "model"}
return None
# Verify middleware was created and has can_jump_to metadata
assert isinstance(conditional_after, AgentMiddleware)
assert getattr(conditional_after.__class__.after_model, "__can_jump_to__", []) == [
"model",
"end",
]
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does test_can_jump_to_with_after_model_decorator() do?
test_can_jump_to_with_after_model_decorator() is a function in the langchain codebase, defined in libs/langchain_v1/tests/unit_tests/agents/middleware/core/test_decorators.py.
Where is test_can_jump_to_with_after_model_decorator() defined?
test_can_jump_to_with_after_model_decorator() is defined in libs/langchain_v1/tests/unit_tests/agents/middleware/core/test_decorators.py at line 228.
What does test_can_jump_to_with_after_model_decorator() call?
test_can_jump_to_with_after_model_decorator() 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