Home / Function/ test_effort_parameter() — langchain Function Reference

test_effort_parameter() — langchain Function Reference

Architecture documentation for the test_effort_parameter() function in test_chat_models.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  63fdb2ce_0351_a9e9_848d_a8635ca4fe02["test_effort_parameter()"]
  f27640dd_3870_5548_d153_f9504ae1021f["test_chat_models.py"]
  63fdb2ce_0351_a9e9_848d_a8635ca4fe02 -->|defined in| f27640dd_3870_5548_d153_f9504ae1021f
  style 63fdb2ce_0351_a9e9_848d_a8635ca4fe02 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/partners/anthropic/tests/integration_tests/test_chat_models.py lines 1194–1215

def test_effort_parameter() -> None:
    """Test that effort parameter can be passed without errors.

    Only Opus 4.5 supports currently.
    """
    llm = ChatAnthropic(
        model="claude-opus-4-5-20251101",
        effort="medium",
        max_tokens=100,
    )

    result = llm.invoke("Say hello in one sentence")

    # Verify we got a response
    assert isinstance(result.content, str)
    assert len(result.content) > 0

    # Verify response metadata is present
    assert "model_name" in result.response_metadata
    assert result.usage_metadata is not None
    assert result.usage_metadata["input_tokens"] > 0
    assert result.usage_metadata["output_tokens"] > 0

Domain

Subdomains

Frequently Asked Questions

What does test_effort_parameter() do?
test_effort_parameter() is a function in the langchain codebase, defined in libs/partners/anthropic/tests/integration_tests/test_chat_models.py.
Where is test_effort_parameter() defined?
test_effort_parameter() is defined in libs/partners/anthropic/tests/integration_tests/test_chat_models.py at line 1194.

Analyze Your Own Codebase

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

Try Supermodel Free