scrubUnsupportedMultimodalContent(
messages: readonly BaseMessage<MessageStructure<MessageToolSet>, MessageType>[],
model: unknown| Name | Type | Description |
|---|---|---|
messages* | readonly BaseMessage<MessageStructure<MessageToolSet>, MessageType>[] | |
model* | unknown |
Without this, a request carrying content the model can't accept (e.g. a
.zip file sent to a model without file support) fails with a
non-retryable 400, and since the content stays in history, every later
turn fails the same way. Only the request is changed; messages in state
are left untouched, so switching to a model that accepts the content
sends it again.