Skip to content

[cherry-pick] Replace images with placeholders in summarization prompt#309727

Open
vs-code-engineering[bot] wants to merge 1 commit intorelease/1.116from
cherry-pick/309643
Open

[cherry-pick] Replace images with placeholders in summarization prompt#309727
vs-code-engineering[bot] wants to merge 1 commit intorelease/1.116from
cherry-pick/309643

Conversation

@vs-code-engineering
Copy link
Copy Markdown
Contributor

Cherry-pick of #309643 from main.

Problem

Gemini models hit "Too many images in request: 11 images provided, but the model supports a maximum of 10 images" during foreground, background, and inline summarization (~29 events in 3 days across gemini-3.1-pro-preview and gemini-3-flash-preview).

Root Cause

The summarization prompt renders the full conversation history including all image content parts (user-attached images and tool-result screenshots). When a conversation accumulates >10 images, Gemini rejects the request.

Fix

Replaces Image content parts with a [Image was attached] text placeholder.

@vs-code-engineering vs-code-engineering bot added the cherry-pick-artifact Auto-generated cherry-pick PR label Apr 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cherry-pick-artifact Auto-generated cherry-pick PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant