awrap_model_call() — langchain Function Reference
Architecture documentation for the awrap_model_call() function in bash.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 613ee831_2aa1_01c5_f3a3_39c0c4a8aebf["awrap_model_call()"] 546b3f0b_6988_ae2d_a04f_e60cc048d3ff["ClaudeBashToolMiddleware"] 613ee831_2aa1_01c5_f3a3_39c0c4a8aebf -->|defined in| 546b3f0b_6988_ae2d_a04f_e60cc048d3ff style 613ee831_2aa1_01c5_f3a3_39c0c4a8aebf fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/partners/anthropic/langchain_anthropic/middleware/bash.py lines 71–81
async def awrap_model_call(
self,
request: ModelRequest,
handler: Callable[[ModelRequest], Awaitable[ModelResponse]],
) -> ModelResponse:
"""Async: replace parent's shell tool with Claude's bash descriptor."""
filtered = [
t for t in request.tools if getattr(t, "name", None) != BASH_TOOL_NAME
]
tools = [*filtered, {"type": BASH_TOOL_TYPE, "name": BASH_TOOL_NAME}]
return await handler(request.override(tools=tools))
Domain
Subdomains
Source
Frequently Asked Questions
What does awrap_model_call() do?
awrap_model_call() is a function in the langchain codebase, defined in libs/partners/anthropic/langchain_anthropic/middleware/bash.py.
Where is awrap_model_call() defined?
awrap_model_call() is defined in libs/partners/anthropic/langchain_anthropic/middleware/bash.py at line 71.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free