@@ -1931,6 +1931,7 @@ def test_start_as_current_observation_types():
19311931 assert len (observations ) == 1 , f"Expected one { obs_type .upper ()} observation"
19321932
19331933
1934+ @pytest .mark .skip (reason = "Works after OSS release 3.102" )
19341935def test_that_generation_like_properties_are_actually_created ():
19351936 """Test that generation-like observation types properly support generation properties."""
19361937 from langfuse ._client .constants import (
@@ -1943,7 +1944,7 @@ def test_that_generation_like_properties_are_actually_created():
19431944
19441945 test_model = "test-model"
19451946 test_completion_start_time = datetime .now (timezone .utc )
1946- test_model_parameters = {"temperature" : 0.7 , "max_tokens" : 100 }
1947+ test_model_parameters = {"temperature" : " 0.7" , "max_tokens" : " 100" }
19471948 test_usage_details = {"prompt_tokens" : 10 , "completion_tokens" : 20 }
19481949 test_cost_details = {"input" : 0.01 , "output" : 0.02 , "total" : 0.03 }
19491950
@@ -2012,8 +2013,11 @@ def test_that_generation_like_properties_are_actually_created():
20122013 test_usage_details , total = 30
20132014 ), f"{ obs_type } should persist usage_details" # API adds total
20142015
2015- # completion_start_time
2016- if obs .completion_start_time is not None :
2017- assert (
2018- obs .completion_start_time is not None
2019- ), f"{ obs_type } should persist completion_start_time property"
2016+ assert (
2017+ obs .cost_details == test_cost_details
2018+ ), f"{ obs_type } should persist cost_details"
2019+
2020+ # completion_start_time, because of time skew not asserting time
2021+ assert (
2022+ obs .completion_start_time is not None
2023+ ), f"{ obs_type } should persist completion_start_time property"
0 commit comments