fix: Update LiteLLM system instruction role from "developer" to "system"

This change replaces the use of `ChatCompletionDeveloperMessage` with `ChatCompletionSystemMessage` and sets the role to "system" for providing system instructions to LiteLLM models

Close #3657

Co-authored-by: George Weale <gweale@google.com>
PiperOrigin-RevId: 835388738
This commit is contained in:
George Weale
2025-11-21 15:56:04 -08:00
committed by Copybara-Service
parent 52674e7fac
commit 2e1f730c3b
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -1195,7 +1195,7 @@ async def test_generate_content_async_with_system_instruction(
_, kwargs = mock_acompletion.call_args
assert kwargs["model"] == "test_model"
assert kwargs["messages"][0]["role"] == "developer"
assert kwargs["messages"][0]["role"] == "system"
assert kwargs["messages"][0]["content"] == "Test system instruction"
assert kwargs["messages"][1]["role"] == "user"
assert kwargs["messages"][1]["content"] == "Test prompt"