Haricharanpanjwani commented on code in PR #813:
URL: https://github.com/apache/burr/pull/813#discussion_r3567111008


##########
burr/integrations/pydantic.py:
##########
@@ -307,6 +314,10 @@ def _validate_and_extract_signature_types_streaming(
     if stream_type is None:
         # TODO -- derive from the signature
         raise ValueError(f"stream_type is required for function: 
{fn.__qualname__}")
+    if not _is_valid_stream_type(stream_type):

Review Comment:
   This looks like the key behavior change in the PR, so I think we should add 
negative-path coverage for it as well. Right now the new tests show that valid 
unions are accepted, but they don’t pin the rejection behavior for invalid 
cases like `stream_type=int` or `stream_type=Union[TextChunk, int]`. Could we 
add a couple of `pytest.raises(ValueError)` assertions for those?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to