awrap_model_call() — langchain Function Reference
Architecture documentation for the awrap_model_call() function in test_wrap_model_call.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 8b14d6df_29e1_d984_6a2a_6e2bb0e2e4b2["awrap_model_call()"] 191cb17e_2dab_f07e_4074_45b22139b291["LoggingMiddleware"] 8b14d6df_29e1_d984_6a2a_6e2bb0e2e4b2 -->|defined in| 191cb17e_2dab_f07e_4074_45b22139b291 bd51b4b6_85b2_b55f_719b_5240c1a33cae["awrap_model_call()"] bd51b4b6_85b2_b55f_719b_5240c1a33cae -->|calls| 8b14d6df_29e1_d984_6a2a_6e2bb0e2e4b2 fcd4d479_2ee0_b4e3_cb0c_ac4cf10fc768["awrap_model_call()"] fcd4d479_2ee0_b4e3_cb0c_ac4cf10fc768 -->|calls| 8b14d6df_29e1_d984_6a2a_6e2bb0e2e4b2 3b68e785_0b40_0816_9ee0_6eab22acf6ac["awrap_model_call()"] 3b68e785_0b40_0816_9ee0_6eab22acf6ac -->|calls| 8b14d6df_29e1_d984_6a2a_6e2bb0e2e4b2 2e11e37c_8880_df9b_8469_c973104f6b4a["test_async_model_with_middleware()"] 2e11e37c_8880_df9b_8469_c973104f6b4a -->|calls| 8b14d6df_29e1_d984_6a2a_6e2bb0e2e4b2 a22d9207_3949_0a51_b352_3861c56117b7["test_async_retry()"] a22d9207_3949_0a51_b352_3861c56117b7 -->|calls| 8b14d6df_29e1_d984_6a2a_6e2bb0e2e4b2 63b1c906_416a_cecb_4300_aac3c338b4fe["test_sync_invoke_with_only_async_middleware_raises_error()"] 63b1c906_416a_cecb_4300_aac3c338b4fe -->|calls| 8b14d6df_29e1_d984_6a2a_6e2bb0e2e4b2 a19c0a5c_ca2b_3869_ab7a_70d066eca849["test_sync_invoke_with_mixed_middleware()"] a19c0a5c_ca2b_3869_ab7a_70d066eca849 -->|calls| 8b14d6df_29e1_d984_6a2a_6e2bb0e2e4b2 bd51b4b6_85b2_b55f_719b_5240c1a33cae["awrap_model_call()"] 8b14d6df_29e1_d984_6a2a_6e2bb0e2e4b2 -->|calls| bd51b4b6_85b2_b55f_719b_5240c1a33cae style 8b14d6df_29e1_d984_6a2a_6e2bb0e2e4b2 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain_v1/tests/unit_tests/agents/middleware/core/test_wrap_model_call.py lines 1387–1395
async def awrap_model_call(
self,
request: ModelRequest,
handler: Callable[[ModelRequest], Awaitable[ModelResponse]],
) -> ModelCallResult:
log.append("before")
result = await handler(request)
log.append("after")
return result
Domain
Subdomains
Calls
Called By
Source
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_wrap_model_call.py.
Where is awrap_model_call() defined?
awrap_model_call() is defined in libs/langchain_v1/tests/unit_tests/agents/middleware/core/test_wrap_model_call.py at line 1387.
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 7 function(s): awrap_model_call, awrap_model_call, awrap_model_call, test_async_model_with_middleware, test_async_retry, test_sync_invoke_with_mixed_middleware, test_sync_invoke_with_only_async_middleware_raises_error.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free