test_mismatched_context_schema() — langchain Function Reference
Architecture documentation for the test_mismatched_context_schema() function in test_middleware_type_errors.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 2ea564d8_b444_2f54_f9bd_4a55ba4253d7["test_mismatched_context_schema()"] 47e0e3d7_cac1_0ec3_228a_0fd46437bc22["test_middleware_type_errors.py"] 2ea564d8_b444_2f54_f9bd_4a55ba4253d7 -->|defined in| 47e0e3d7_cac1_0ec3_228a_0fd46437bc22 style 2ea564d8_b444_2f54_f9bd_4a55ba4253d7 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain_v1/tests/unit_tests/agents/middleware_typing/test_middleware_type_errors.py lines 98–106
def test_mismatched_context_schema() -> None:
# TYPE ERROR: SessionContextMiddleware expects SessionContext,
# but context_schema is UserContext
fake_model = FakeToolCallingModel()
_agent = create_agent( # type: ignore[misc]
model=fake_model,
middleware=[SessionContextMiddleware()],
context_schema=UserContext,
)
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does test_mismatched_context_schema() do?
test_mismatched_context_schema() is a function in the langchain codebase, defined in libs/langchain_v1/tests/unit_tests/agents/middleware_typing/test_middleware_type_errors.py.
Where is test_mismatched_context_schema() defined?
test_mismatched_context_schema() is defined in libs/langchain_v1/tests/unit_tests/agents/middleware_typing/test_middleware_type_errors.py at line 98.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free