File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
posthog/test/ai/langchain Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -1565,6 +1565,7 @@ def test_anthropic_cache_write_and_read_tokens(mock_client):
15651565 usage_metadata = {
15661566 "input_tokens" : 200 ,
15671567 "output_tokens" : 30 ,
1568+ "total_tokens" : 1030 ,
15681569 "cache_read_input_tokens" : 800 , # Anthropic cache read
15691570 },
15701571 )
@@ -1711,7 +1712,9 @@ def test_combined_reasoning_and_cache_tokens(mock_client):
17111712
17121713@pytest .mark .skipif (not OPENAI_API_KEY , reason = "OPENAI_API_KEY is not set" )
17131714def test_openai_reasoning_tokens (mock_client ):
1714- model = ChatOpenAI (api_key = OPENAI_API_KEY , model = "o4-mini" , max_tokens = 10 )
1715+ model = ChatOpenAI (
1716+ api_key = OPENAI_API_KEY , model = "o4-mini" , max_completion_tokens = 10
1717+ )
17151718 cb = CallbackHandler (
17161719 mock_client , trace_id = "test-trace-id" , distinct_id = "test-distinct-id"
17171720 )
You can’t perform that action at this time.
0 commit comments