Home / Function/ wrap_model_call() — langchain Function Reference

wrap_model_call() — langchain Function Reference

Architecture documentation for the wrap_model_call() function in test_dynamic_tools.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  437e50e6_0bfa_b2c3_9af2_f42a67b9eb92["wrap_model_call()"]
  1fa34ffe_d005_3b8a_66f7_8634ed0d3c28["DynamicToolMiddleware"]
  437e50e6_0bfa_b2c3_9af2_f42a67b9eb92 -->|defined in| 1fa34ffe_d005_3b8a_66f7_8634ed0d3c28
  86397ab0_aaf1_a31a_eced_6c15058ce22b["wrap_model_call()"]
  86397ab0_aaf1_a31a_eced_6c15058ce22b -->|calls| 437e50e6_0bfa_b2c3_9af2_f42a67b9eb92
  97fe6782_09cd_6003_145a_deabe708ea7c["wrap_model_call()"]
  97fe6782_09cd_6003_145a_deabe708ea7c -->|calls| 437e50e6_0bfa_b2c3_9af2_f42a67b9eb92
  27e57f6e_279a_bc2d_2c0c_af66d9891168["wrap_model_call()"]
  27e57f6e_279a_bc2d_2c0c_af66d9891168 -->|calls| 437e50e6_0bfa_b2c3_9af2_f42a67b9eb92
  a863f7c6_2833_0127_d959_f352a118a8d8["wrap_model_call()"]
  a863f7c6_2833_0127_d959_f352a118a8d8 -->|calls| 437e50e6_0bfa_b2c3_9af2_f42a67b9eb92
  97fe6782_09cd_6003_145a_deabe708ea7c["wrap_model_call()"]
  437e50e6_0bfa_b2c3_9af2_f42a67b9eb92 -->|calls| 97fe6782_09cd_6003_145a_deabe708ea7c
  style 437e50e6_0bfa_b2c3_9af2_f42a67b9eb92 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain_v1/tests/unit_tests/agents/middleware/core/test_dynamic_tools.py lines 54–60

    def wrap_model_call(
        self,
        request: ModelRequest,
        handler: Callable[[ModelRequest], ModelResponse],
    ) -> ModelCallResult:
        updated = request.override(tools=[*request.tools, dynamic_tool])
        return handler(updated)

Domain

Subdomains

Frequently Asked Questions

What does wrap_model_call() do?
wrap_model_call() is a function in the langchain codebase, defined in libs/langchain_v1/tests/unit_tests/agents/middleware/core/test_dynamic_tools.py.
Where is wrap_model_call() defined?
wrap_model_call() is defined in libs/langchain_v1/tests/unit_tests/agents/middleware/core/test_dynamic_tools.py at line 54.
What does wrap_model_call() call?
wrap_model_call() calls 1 function(s): wrap_model_call.
What calls wrap_model_call()?
wrap_model_call() is called by 4 function(s): wrap_model_call, wrap_model_call, wrap_model_call, wrap_model_call.

Analyze Your Own Codebase

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

Try Supermodel Free