mirror of
https://github.com/NanmiCoder/claude-code-haha.git
synced 2026-10-10 20:03:13 +08:00
993eb7631d
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.