From b42205c48cc346f66a1951effa4f275ce0174c64 Mon Sep 17 00:00:00 2001 From: Genmin Date: Thu, 30 Apr 2026 08:39:18 -0700 Subject: [PATCH] test: cover preserved non-leading system messages --- .../test_litellm/litellm_core_utils/test_base_llm_base_utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_litellm/litellm_core_utils/test_base_llm_base_utils.py b/tests/test_litellm/litellm_core_utils/test_base_llm_base_utils.py index 00aa2c95936..7ed50edc1af 100644 --- a/tests/test_litellm/litellm_core_utils/test_base_llm_base_utils.py +++ b/tests/test_litellm/litellm_core_utils/test_base_llm_base_utils.py @@ -81,6 +81,7 @@ def test_map_developer_role_converts_later_developer_messages_in_place(): def test_map_developer_role_converts_later_developer_without_leading_system(): messages = [ {"role": "user", "content": "Hello!"}, + {"role": "system", "content": "Keep later system messages in place."}, {"role": "developer", "content": "Prefer concise answers."}, ] @@ -88,6 +89,7 @@ def test_map_developer_role_converts_later_developer_without_leading_system(): assert result == [ {"role": "user", "content": "Hello!"}, + {"role": "system", "content": "Keep later system messages in place."}, {"role": "system", "content": "Prefer concise answers."}, ]