Home / Function/ test_jump_to_is_ephemeral() — langchain Function Reference

test_jump_to_is_ephemeral() — langchain Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  16747794_2943_4606_4be6_9581b3ca3709["test_jump_to_is_ephemeral()"]
  8310d669_2524_e019_e333_8473b50a4990["test_framework.py"]
  16747794_2943_4606_4be6_9581b3ca3709 -->|defined in| 8310d669_2524_e019_e333_8473b50a4990
  72ef93cf_d7c1_f508_47a7_a7badc3939ff["after_model()"]
  16747794_2943_4606_4be6_9581b3ca3709 -->|calls| 72ef93cf_d7c1_f508_47a7_a7badc3939ff
  style 16747794_2943_4606_4be6_9581b3ca3709 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain_v1/tests/unit_tests/agents/middleware/core/test_framework.py lines 466–478

def test_jump_to_is_ephemeral() -> None:
    class MyMiddleware(AgentMiddleware):
        def before_model(self, state: AgentState[Any], runtime: Runtime) -> dict[str, Any]:
            assert "jump_to" not in state
            return {"jump_to": "model"}

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

    agent = create_agent(model=FakeToolCallingModel(), middleware=[MyMiddleware()])
    result = agent.invoke({"messages": [HumanMessage("Hello")]})
    assert "jump_to" not in result

Domain

Subdomains

Frequently Asked Questions

What does test_jump_to_is_ephemeral() do?
test_jump_to_is_ephemeral() is a function in the langchain codebase, defined in libs/langchain_v1/tests/unit_tests/agents/middleware/core/test_framework.py.
Where is test_jump_to_is_ephemeral() defined?
test_jump_to_is_ephemeral() is defined in libs/langchain_v1/tests/unit_tests/agents/middleware/core/test_framework.py at line 466.
What does test_jump_to_is_ephemeral() call?
test_jump_to_is_ephemeral() 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