Preserve annotations when omitting unsupported media (#40277)

## What changed

- Render omitted image and audio inputs as contextual fragments tagged with
  `images.unsupported` and `audio.unsupported` content kinds.
- Normalize message media through annotated content so metadata for surrounding
  content remains intact when switching to a model without media support.

## Testing

- Extend history and model-switching tests to verify content-kind annotations
  before and after unsupported media is replaced.

GitOrigin-RevId: 4ee6577f8b78bd5a850ee01ea9d4590c20272850
This commit is contained in:
pakrym-oai
2026-08-23 20:14:26 +00:00
committed by copyberry
parent 287587c32c
commit aec653daa9
6 changed files with 115 additions and 70 deletions
+1 -1
View File
@@ -11312,7 +11312,7 @@ async fn sample_rollout(
(
rollout_items,
live_history.for_prompt(&reconstruction_turn.model_info.input_modalities),
strip_metadata_from_items(&raw_history_items(&live_history)),
)
}