Files
claude-code-haha/src
程序员阿江(Relakkes) 993eb7631d fix(api): keep provider image rejections from poisoning the session
When a text-only model rejects an image with wording the classifier
doesn't recognize, the 400 fell through to a generic API error with no
businessErrorCode, so normalizeMessagesForAPI never stripped the image
and every later turn on that model re-failed the same way. And when the
wording did match, the strip anchor applied forever — switching to a
vision-capable model still replayed history with the image removed.

Classify any 400/422 on a request that actually carried image blocks as
image_unsupported when no more specific classifier matched, and gate the
error-anchored strip to the model that produced the error (sourceModel):
the same model keeps stripping and heals, a different model replays the
image, and a misclassified anchor only ever affects its own model.
2026-09-14 15:45:27 +08:00
..
2026-03-31 01:55:58 -07:00
2026-03-31 01:55:58 -07:00
2026-03-31 01:55:58 -07:00
2026-03-31 01:55:58 -07:00
2026-03-31 01:55:58 -07:00
2026-03-31 01:55:58 -07:00