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:
ly-wang19 2026-06-23 19:20:06 +08:00
parent 298a2fd0b9
commit 2142fadfd9
No known key found for this signature in database

View file

@ -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