test_effort_parameter_validation() — langchain Function Reference
Architecture documentation for the test_effort_parameter_validation() function in test_chat_models.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD c7f0c336_ae97_1731_8910_601ab3ddaf61["test_effort_parameter_validation()"] 18428dc5_a41b_90c6_88ad_615296ee3311["test_chat_models.py"] c7f0c336_ae97_1731_8910_601ab3ddaf61 -->|defined in| 18428dc5_a41b_90c6_88ad_615296ee3311 style c7f0c336_ae97_1731_8910_601ab3ddaf61 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/partners/anthropic/tests/unit_tests/test_chat_models.py lines 2085–2105
def test_effort_parameter_validation() -> None:
"""Test that effort parameter is validated correctly.
The effort parameter is generally available on Claude Opus 4.6 and Opus 4.5.
"""
# Valid effort values should work
model = ChatAnthropic(model="claude-opus-4-5-20251101", effort="high")
assert model.effort == "high"
model = ChatAnthropic(model="claude-opus-4-5-20251101", effort="medium")
assert model.effort == "medium"
model = ChatAnthropic(model="claude-opus-4-5-20251101", effort="low")
assert model.effort == "low"
model = ChatAnthropic(model="claude-opus-4-6", effort="max")
assert model.effort == "max"
# Invalid effort values should raise ValidationError
with pytest.raises(ValidationError, match="Input should be"):
ChatAnthropic(model="claude-opus-4-5-20251101", effort="invalid") # type: ignore[arg-type]
Domain
Subdomains
Source
Frequently Asked Questions
What does test_effort_parameter_validation() do?
test_effort_parameter_validation() is a function in the langchain codebase, defined in libs/partners/anthropic/tests/unit_tests/test_chat_models.py.
Where is test_effort_parameter_validation() defined?
test_effort_parameter_validation() is defined in libs/partners/anthropic/tests/unit_tests/test_chat_models.py at line 2085.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free