@@ -1125,9 +1125,9 @@ def test_anthropic_chain(mock_client):
11251125 )
11261126 chain = prompt | ChatAnthropic (
11271127 api_key = ANTHROPIC_API_KEY ,
1128- model = "claude-3-opus-20240229 " ,
1128+ model = "claude-sonnet-4-5-20250929 " ,
11291129 temperature = 0 ,
1130- max_tokens = 1 ,
1130+ max_tokens = 1024 ,
11311131 )
11321132 callbacks = CallbackHandler (
11331133 mock_client ,
@@ -1150,12 +1150,12 @@ def test_anthropic_chain(mock_client):
11501150 assert gen_args ["event" ] == "$ai_generation"
11511151 assert gen_props ["$ai_trace_id" ] == "test-trace-id"
11521152 assert gen_props ["$ai_provider" ] == "anthropic"
1153- assert gen_props ["$ai_model" ] == "claude-3-opus-20240229 "
1153+ assert gen_props ["$ai_model" ] == "claude-sonnet-4-5-20250929 "
11541154 assert gen_props ["foo" ] == "bar"
11551155
11561156 assert gen_props ["$ai_model_parameters" ] == {
11571157 "temperature" : 0.0 ,
1158- "max_tokens" : 1 ,
1158+ "max_tokens" : 1024 ,
11591159 "streaming" : False ,
11601160 }
11611161 assert gen_props ["$ai_input" ] == [
@@ -1171,7 +1171,7 @@ def test_anthropic_chain(mock_client):
11711171 <= approximate_latency
11721172 )
11731173 assert gen_props ["$ai_input_tokens" ] == 17
1174- assert gen_props ["$ai_output_tokens" ] == 1
1174+ assert gen_props ["$ai_output_tokens" ] == 4
11751175
11761176 assert trace_args ["event" ] == "$ai_trace"
11771177 assert trace_props ["$ai_input_state" ] == {}
@@ -1188,9 +1188,9 @@ async def test_async_anthropic_streaming(mock_client):
11881188 )
11891189 chain = prompt | ChatAnthropic (
11901190 api_key = ANTHROPIC_API_KEY ,
1191- model = "claude-3-opus-20240229 " ,
1191+ model = "claude-sonnet-4-5-20250929 " ,
11921192 temperature = 0 ,
1193- max_tokens = 1 ,
1193+ max_tokens = 1024 ,
11941194 streaming = True ,
11951195 stream_usage = True ,
11961196 )
0 commit comments