mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-11 03:38:38 +00:00
test: assert the chunk predicate rejects extra keys
Covers the upper bound of the two-sided predicate in the same test that guards the lower bound, per review on #43499.
This commit is contained in:
parent
f7d6bb579d
commit
cf881cbc7b
1 changed files with 1 additions and 0 deletions
|
|
@ -4999,6 +4999,7 @@ def test_generic_chunk_predicate_rejects_partial_chunk():
|
|||
"index": 0,
|
||||
}
|
||||
assert generic_chunk_has_all_required_fields(full_chunk) is True
|
||||
assert generic_chunk_has_all_required_fields({**full_chunk, "unknown_extra_key": "value"}) is False
|
||||
|
||||
stream = convert_generic_chunk_to_model_response_stream(full_chunk)
|
||||
assert stream.choices[0].delta.content == "hello"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue