test_to_model_kwargs() — langchain Function Reference
Architecture documentation for the test_to_model_kwargs() function in test_responses.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 9d63d9de_213a_bbdf_ef01_6bf305e108e6["test_to_model_kwargs()"] 6ca1af52_857f_2e7b_78f5_67116eab30df["TestProviderStrategy"] 9d63d9de_213a_bbdf_ef01_6bf305e108e6 -->|defined in| 6ca1af52_857f_2e7b_78f5_67116eab30df style 9d63d9de_213a_bbdf_ef01_6bf305e108e6 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain_v1/tests/unit_tests/agents/test_responses.py lines 80–104
def test_to_model_kwargs(self) -> None:
strategy_default = ProviderStrategy(schema=_TestModel)
assert strategy_default.to_model_kwargs() == {
"response_format": {
"json_schema": {
"name": "_TestModel",
"schema": {
"description": "A test model for structured output.",
"properties": {
"age": {"title": "Age", "type": "integer"},
"email": {
"default": "default@example.com",
"title": "Email",
"type": "string",
},
"name": {"title": "Name", "type": "string"},
},
"required": ["name", "age"],
"title": "_TestModel",
"type": "object",
},
},
"type": "json_schema",
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does test_to_model_kwargs() do?
test_to_model_kwargs() is a function in the langchain codebase, defined in libs/langchain_v1/tests/unit_tests/agents/test_responses.py.
Where is test_to_model_kwargs() defined?
test_to_model_kwargs() is defined in libs/langchain_v1/tests/unit_tests/agents/test_responses.py at line 80.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free