test_can_jump_to_with_before_model_decorator() — langchain Function Reference
Architecture documentation for the test_can_jump_to_with_before_model_decorator() function in test_decorators.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD ba50c5da_b594_4007_9a20_399e93249b8a["test_can_jump_to_with_before_model_decorator()"] 85a104a3_11cf_6539_d0c0_ba69a17a41d4["test_decorators.py"] ba50c5da_b594_4007_9a20_399e93249b8a -->|defined in| 85a104a3_11cf_6539_d0c0_ba69a17a41d4 68028dcd_ea5b_7d3a_0d75_c9ebd1cef92b["before_model()"] ba50c5da_b594_4007_9a20_399e93249b8a -->|calls| 68028dcd_ea5b_7d3a_0d75_c9ebd1cef92b style ba50c5da_b594_4007_9a20_399e93249b8a fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain_v1/tests/unit_tests/agents/middleware/core/test_decorators.py lines 212–225
def test_can_jump_to_with_before_model_decorator() -> None:
"""Test can_jump_to parameter used with before_model decorator."""
@before_model(can_jump_to=["end"])
def conditional_before(
state: AgentState[Any], *_args: Any, **_kwargs: Any
) -> dict[str, Any] | None:
if len(state["messages"]) > 3:
return {"jump_to": "end"}
return None
# Verify middleware was created and has can_jump_to metadata
assert isinstance(conditional_before, AgentMiddleware)
assert getattr(conditional_before.__class__.before_model, "__can_jump_to__", []) == ["end"]
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does test_can_jump_to_with_before_model_decorator() do?
test_can_jump_to_with_before_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_before_model_decorator() defined?
test_can_jump_to_with_before_model_decorator() is defined in libs/langchain_v1/tests/unit_tests/agents/middleware/core/test_decorators.py at line 212.
What does test_can_jump_to_with_before_model_decorator() call?
test_can_jump_to_with_before_model_decorator() calls 1 function(s): before_model.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free