Commit b7e74c3
committed
test: add failing tests for Groq message mutation bug (#562)
Add unit tests and E2E tests that detect the bug where the Groq
structured output code path in llm_invoke.py mutates the shared
formatted_messages list in-place, corrupting fallback model messages.
- 5 unit tests covering both mutation vectors (list .insert() and
dict content overwrite) plus cumulative corruption
- 3 E2E tests exercising real CSV loading and model selection with
only litellm.completion mocked
All 8 tests fail on current code and will pass once the fix
(copy.deepcopy at line 1966) is applied.
Fixes #5621 parent d9ab380 commit b7e74c3
File tree
2 files changed
+769
-0
lines changed- tests
2 files changed
+769
-0
lines changed
0 commit comments