Repository navigation
test(utilities): cover non-dict message content blocks - #9467
Vidit Ostwal (Vidit-Ostwal) merged 1 commit into
Conversation
Strix Security ReviewWarning This pull request has 45 commits after the last Strix review ( ✅ No open security findings. PR summary: Adds two test cases to TestMessageContentText pinning that non-dict entries in a multimodal content list are skipped, and that a list with no usable text blocks renders as "[multimodal content]" instead of a Python repr. No runtime changes. Review summaryThis PR adds two regression tests and changes no production code: the new cases only assert the string output of the existing Review 1 on this PR · Reviewed by Strix |
541240b to
7fe2785
Compare
|
Strix (@strix-security) please review the latest changes after the rebase (head |
Sakura-798
left a comment
There was a problem hiding this comment.
Strix (@strix-security) please review the latest changes after the rebase (head 7fe2785).
7fe2785 to
c815230
Compare
Related issue
Fixes #9466
Summary
Adds regression coverage for non-dict blocks in
message_content_text().None, a string, and an integer alongside a valid text block still returns the valid text.[multimodal content]rather than a Python repr.Verification
uv run pytest lib/crewai/tests/utilities/test_agent_utils.py::TestMessageContentText -q-> 11 passeduv run pytest -o addopts='' -p no:cacheprovider lib/crewai/tests/utilities/test_agent_utils.py::TestMessageContentText -q-> 11 passeduv run ruff check lib/ --no-fixuv run ruff format --check lib/AI assistance
This PR was prepared with AI assistance. The
llm-generatedlabel could not be applied by the author because external contributors do not have label permissions; please add it during triage.