mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-14 09:03:16 +00:00
style: drop redundant comment and add Final on #45470 regression test
Address greptile review on PR #45478: remove explanatory comments and annotate new test locals with Final per AGENTS.md.
This commit is contained in:
parent
561951e317
commit
4c1cc99d3e
2 changed files with 2 additions and 4 deletions
|
|
@ -288,8 +288,6 @@ class LiteLLMAnthropicToResponsesAPIAdapter:
|
|||
},
|
||||
)
|
||||
if btype == "text":
|
||||
# Emit text in block order so text before/after tool_use is not
|
||||
# replayed as one trailing assistant message (#45470).
|
||||
return (
|
||||
{
|
||||
"type": "message",
|
||||
|
|
|
|||
|
|
@ -673,7 +673,7 @@ class TestTranslateMessagesToResponsesInput:
|
|||
|
||||
def test_assistant_text_before_and_after_tool_use_preserves_order(self):
|
||||
"""Text around tool_use stays in block order, not replayed after (#45470)."""
|
||||
messages = [
|
||||
messages: Final = [
|
||||
{"role": "user", "content": "weather in Paris?"},
|
||||
{
|
||||
"role": "assistant",
|
||||
|
|
@ -695,7 +695,7 @@ class TestTranslateMessagesToResponsesInput:
|
|||
],
|
||||
},
|
||||
]
|
||||
result = _translate_messages(messages)
|
||||
result: Final = _translate_messages(messages)
|
||||
assert [item["type"] for item in result] == [
|
||||
"message",
|
||||
"message",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue