From 2d202f9762087c7b04379726d15a7959520d06e3 Mon Sep 17 00:00:00 2001 From: ccurme Date: Thu, 8 May 2025 09:23:36 -0400 Subject: [PATCH] anthropic[patch]: split test into two (#31167) --- .../anthropic/tests/integration_tests/test_chat_models.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libs/partners/anthropic/tests/integration_tests/test_chat_models.py b/libs/partners/anthropic/tests/integration_tests/test_chat_models.py index befdca0ec1c..a2563cc480d 100644 --- a/libs/partners/anthropic/tests/integration_tests/test_chat_models.py +++ b/libs/partners/anthropic/tests/integration_tests/test_chat_models.py @@ -134,6 +134,9 @@ async def test_stream_usage() -> None: async for token in model.astream("hi"): assert isinstance(token, AIMessageChunk) assert token.usage_metadata is None + + +async def test_stream_usage_override() -> None: # check we override with kwarg model = ChatAnthropic(model_name=MODEL_NAME) # type: ignore[call-arg] assert model.stream_usage