test_stream_events_v3(
self,
model: BaseChatModel,
) -> NoneTest that model.stream_events("Hello", version="v3") works.
Exercises the content-block-centric streaming protocol. Passing this
test indicates the model participates in stream_events(version="v3") either
natively (via _stream_chat_model_events) or through the compat bridge that
converts _stream chunks into protocol events.
First, debug
langchain_tests.integration_tests.chat_models.ChatModelIntegrationTests.test_stream
— stream_events(version="v3") falls back to the same
_stream path via the compat bridge when the model does not
implement
_stream_chat_model_events. If test_stream passes but this does
not, inspect the raised lifecycle violation: it identifies the
event index and the rule broken.