fix(core,openai,anthropic): delegate to core implementation on invoke when streaming=True (#33308)

This commit is contained in:
ccurme
2025-10-06 15:54:55 -04:00
committed by GitHub
parent 08bf8f3dc9
commit de48e102c4
5 changed files with 15 additions and 30 deletions

View File

@@ -89,6 +89,12 @@ def test_openai_model_param() -> None:
assert llm.max_tokens == 10
@pytest.mark.parametrize("async_api", [True, False])
def test_streaming_attribute_should_stream(async_api: bool) -> None:
llm = ChatOpenAI(model="foo", streaming=True)
assert llm._should_stream(async_api=async_api)
def test_openai_client_caching() -> None:
"""Test that the OpenAI client is cached."""
llm1 = ChatOpenAI(model="gpt-4.1-mini")