fix: shorten animation notice and hide frame layout details

This commit is contained in:
Soulter
2026-09-17 18:19:05 +08:00
parent 04265693f8
commit 52f2011f07
2 changed files with 6 additions and 5 deletions
@@ -128,10 +128,9 @@ async def prepare_request_images(
*req.extra_user_content_parts,
TextPart(
text="<system_notice>\n"
"[Animated image] Each animated input (e.g. GIF) has been converted "
"into a frame montage: a single image containing a grid of frames "
"from the same animation. Read the frames left to right, then "
"top to bottom; unused cells are blank.\n"
"[Animated image] Each animation's frames are tiled into one image "
"in reading order. Respond as if viewing the animation; "
"do not mention the frame layout.\n"
"</system_notice>"
).mark_as_temp(),
]
+3 -1
View File
@@ -355,7 +355,9 @@ async def test_animation_montage_notice_reaches_model(harness, tmp_path):
assert notices[0]._no_save
assert notices[0].text.startswith("<system_notice>\n")
assert notices[0].text.endswith("\n</system_notice>")
assert "a single image containing a grid of frames" in notices[0].text
assert "frames are tiled into one image" in notices[0].text
assert "Respond as if viewing the animation" in notices[0].text
assert "do not mention the frame layout" in notices[0].text
@pytest.mark.asyncio