mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-09 03:18:44 +00:00
test(oci): expect finish_reason="tool_calls" for a generic tool-call response
The pre-existing test_transform_response_with_tool_calls asserted finish_reason=="stop" for a GENERIC response carrying tool calls — the old behavior this PR fixes. handle_generic_response now normalizes it to "tool_calls" (OpenAI semantics, consistent with the Cohere path's test_cohere_response_finish_reason_tool_call), so update the assertion. This is the failure the "All Other Providers" CI job surfaced.
This commit is contained in:
parent
298a2fd0b9
commit
2142fadfd9
1 changed files with 4 additions and 1 deletions
|
|
@ -700,7 +700,10 @@ class TestOCIChatConfig:
|
|||
|
||||
choice = result.choices[0]
|
||||
assert isinstance(choice, litellm.Choices)
|
||||
assert choice.finish_reason == "stop"
|
||||
# The response carries tool calls, so finish_reason is normalized to
|
||||
# "tool_calls" (OpenAI semantics) regardless of OCI's raw "stop" — matching
|
||||
# the Cohere path (test_cohere_response_finish_reason_tool_call).
|
||||
assert choice.finish_reason == "tool_calls"
|
||||
|
||||
# Message and tool_calls assertions
|
||||
message = choice.message
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue