Home / Function/ awrap_model_call() — langchain Function Reference

awrap_model_call() — langchain Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  7caabf75_c7f6_610c_9ebb_09ae9729e4cc["awrap_model_call()"]
  492223bc_1f62_a781_1757_303ce38d5e6f["AsyncMiddleware"]
  7caabf75_c7f6_610c_9ebb_09ae9729e4cc -->|defined in| 492223bc_1f62_a781_1757_303ce38d5e6f
  64ee8fe4_37ac_24fd_7c18_563c86e0ee35["awrap_model_call()"]
  64ee8fe4_37ac_24fd_7c18_563c86e0ee35 -->|calls| 7caabf75_c7f6_610c_9ebb_09ae9729e4cc
  a5762091_b2c2_d2b8_9f9a_28ac8f8d0d1b["awrap_model_call()"]
  a5762091_b2c2_d2b8_9f9a_28ac8f8d0d1b -->|calls| 7caabf75_c7f6_610c_9ebb_09ae9729e4cc
  239f6e31_4925_40f9_53aa_7104bf495d5c["awrap_model_call()"]
  239f6e31_4925_40f9_53aa_7104bf495d5c -->|calls| 7caabf75_c7f6_610c_9ebb_09ae9729e4cc
  64ee8fe4_37ac_24fd_7c18_563c86e0ee35["awrap_model_call()"]
  7caabf75_c7f6_610c_9ebb_09ae9729e4cc -->|calls| 64ee8fe4_37ac_24fd_7c18_563c86e0ee35
  style 7caabf75_c7f6_610c_9ebb_09ae9729e4cc fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain_v1/tests/unit_tests/agents/middleware/core/test_framework.py lines 559–566

        async def awrap_model_call(
            self,
            request: ModelRequest,
            handler: Callable[[ModelRequest], Awaitable[ModelResponse]],
        ) -> ModelCallResult:
            calls.append("AsyncMiddleware.awrap_model_call")
            request.messages.append(HumanMessage("async middleware message"))
            return await handler(request)

Domain

Subdomains

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/core/test_framework.py.
Where is awrap_model_call() defined?
awrap_model_call() is defined in libs/langchain_v1/tests/unit_tests/agents/middleware/core/test_framework.py at line 559.
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 3 function(s): awrap_model_call, awrap_model_call, awrap_model_call.

Analyze Your Own Codebase

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

Try Supermodel Free