core[patch]: set version="v2" as default in astream_events (#29894)

This commit is contained in:
ccurme
2025-02-19 18:21:37 -05:00
committed by GitHub
parent a2d05a376c
commit ed3c2bd557
8 changed files with 298 additions and 271 deletions

View File

@@ -1,6 +1,7 @@
"""Module that contains tests for runnable.astream_events API."""
import asyncio
import inspect
import sys
import uuid
from collections.abc import AsyncIterator, Iterable, Iterator, Sequence
@@ -2793,3 +2794,10 @@ async def test_custom_event_root_dispatch_with_in_tool() -> None:
},
],
)
def test_default_is_v2() -> None:
"""Test that we default to version="v2"."""
signature = inspect.signature(Runnable.astream_events)
assert signature.parameters["version"].default == "v2"