Home / Function/ awrap_model_call() — langchain Function Reference

awrap_model_call() — langchain Function Reference

Architecture documentation for the awrap_model_call() function in test_middleware_typing.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  cc5ab3bf_d68a_a52a_4b4c_2fed5e7873bc["awrap_model_call()"]
  7f3c2eee_1df2_8455_80e7_b949120856af["AsyncUserContextMiddleware"]
  cc5ab3bf_d68a_a52a_4b4c_2fed5e7873bc -->|defined in| 7f3c2eee_1df2_8455_80e7_b949120856af
  4190581f_3784_063f_53f4_e785f05be8ff["awrap_model_call()"]
  4190581f_3784_063f_53f4_e785f05be8ff -->|calls| cc5ab3bf_d68a_a52a_4b4c_2fed5e7873bc
  4190581f_3784_063f_53f4_e785f05be8ff["awrap_model_call()"]
  cc5ab3bf_d68a_a52a_4b4c_2fed5e7873bc -->|calls| 4190581f_3784_063f_53f4_e785f05be8ff
  style cc5ab3bf_d68a_a52a_4b4c_2fed5e7873bc fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain_v1/tests/unit_tests/agents/middleware_typing/test_middleware_typing.py lines 325–331

    async def awrap_model_call(
        self,
        request: ModelRequest[UserContext],
        handler: Callable[[ModelRequest[UserContext]], Awaitable[ModelResponse[Any]]],
    ) -> ModelResponse[Any]:
        _user_id: str = request.runtime.context["user_id"]
        return await handler(request)

Domain

Subdomains

Called By

Frequently Asked Questions

What does awrap_model_call() do?
awrap_model_call() is a function in the langchain codebase, defined in libs/langchain_v1/tests/unit_tests/agents/middleware_typing/test_middleware_typing.py.
Where is awrap_model_call() defined?
awrap_model_call() is defined in libs/langchain_v1/tests/unit_tests/agents/middleware_typing/test_middleware_typing.py at line 325.
What does awrap_model_call() call?
awrap_model_call() calls 1 function(s): awrap_model_call.
What calls awrap_model_call()?
awrap_model_call() is called by 1 function(s): awrap_model_call.

Analyze Your Own Codebase

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

Try Supermodel Free