test_custom_model_string() — langchain Function Reference
Architecture documentation for the test_custom_model_string() function in test_tool_emulator.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 0ef94459_a72c_5643_9fda_4a7f707cad94["test_custom_model_string()"] b7251e9a_e972_0104_74b3_75fbbecbaa7b["TestLLMToolEmulatorModelConfiguration"] 0ef94459_a72c_5643_9fda_4a7f707cad94 -->|defined in| b7251e9a_e972_0104_74b3_75fbbecbaa7b style 0ef94459_a72c_5643_9fda_4a7f707cad94 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain_v1/tests/unit_tests/agents/middleware/implementations/test_tool_emulator.py lines 366–377
def test_custom_model_string(self) -> None:
"""Test passing a model string for emulation."""
# Just test that initialization works - don't require anthropic package
try:
emulator = LLMToolEmulator(
tools=["get_weather"], model="anthropic:claude-sonnet-4-5-20250929"
)
assert emulator.model is not None
assert "get_weather" in emulator.tools_to_emulate
except ImportError:
# If anthropic isn't installed, that's fine for this unit test
pass
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does test_custom_model_string() do?
test_custom_model_string() is a function in the langchain codebase, defined in libs/langchain_v1/tests/unit_tests/agents/middleware/implementations/test_tool_emulator.py.
Where is test_custom_model_string() defined?
test_custom_model_string() is defined in libs/langchain_v1/tests/unit_tests/agents/middleware/implementations/test_tool_emulator.py at line 366.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free