mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-11 22:51:28 +00:00
test(databricks): pin the streamed reasoning delta shape and alias
This commit is contained in:
parent
261777d633
commit
fe242f8702
1 changed files with 4 additions and 3 deletions
|
|
@ -653,7 +653,8 @@ def test_transform_choices_prefers_reasoning_blocks_over_top_level_field():
|
|||
assert choices[0].message.content == "391"
|
||||
|
||||
|
||||
def test_chunk_parser_surfaces_top_level_reasoning_delta():
|
||||
@pytest.mark.parametrize("reasoning_key", ["reasoning_content", "reasoning"])
|
||||
def test_chunk_parser_surfaces_top_level_reasoning_delta(reasoning_key: str) -> None:
|
||||
iterator = DatabricksChatResponseIterator(None, sync_stream=True)
|
||||
chunk = {
|
||||
"id": "1",
|
||||
|
|
@ -662,7 +663,7 @@ def test_chunk_parser_surfaces_top_level_reasoning_delta():
|
|||
"model": "lit-qa-deepseek-v4-flash",
|
||||
"choices": [
|
||||
{
|
||||
"delta": {"role": "assistant", "content": "", "reasoning_content": "We need answer"},
|
||||
"delta": {"role": "assistant", "content": None, reasoning_key: "We need answer"},
|
||||
"index": 0,
|
||||
"finish_reason": None,
|
||||
}
|
||||
|
|
@ -672,4 +673,4 @@ def test_chunk_parser_surfaces_top_level_reasoning_delta():
|
|||
parsed = iterator.chunk_parser(chunk)
|
||||
|
||||
assert parsed.choices[0].delta.reasoning_content == "We need answer"
|
||||
assert parsed.choices[0].delta.content == ""
|
||||
assert parsed.choices[0].delta.content is None
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue