litellm - 💡(How to fix) Fix [Feature]: Handle 10 Image Link Limit on Vertex AI [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
BerriAI/litellm#27838Fetched 2026-05-14 03:30:18
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Author
Participants
Timeline (top)
labeled ×3commented ×1renamed ×1

Error Message

'litellm.BadRequestError: Vertex_aiException BadRequestError - { "error": { "code": 400, "message": "You can only include 10 image links. Please reduce the number accordingly.", "status": "INVALID_ARGUMENT" } }

Code Example

'litellm.BadRequestError: Vertex_aiException BadRequestError - {
  "error": {
    "code": 400,
    "message": "You can only include 10 image links. Please reduce the number accordingly.",
    "status": "INVALID_ARGUMENT"
  }
}
RAW_BUFFERClick to expand / collapse

Check for existing issues

  • I have searched the existing issues and checked that my issue is not a duplicate.

The Feature

LiteLLM Proxy Version: v1.81.9

Gemini Pro 3.1 Preview model (and likely others) on Vertex AI have a limit of 10 image links. We regularly hit this limit and get this error:

'litellm.BadRequestError: Vertex_aiException BadRequestError - {
  "error": {
    "code": 400,
    "message": "You can only include 10 image links. Please reduce the number accordingly.",
    "status": "INVALID_ARGUMENT"
  }
}

This limit only applies to image links, there can be more base64 embedded images in the conversation. I know that LiteLLM is already fully capable of converting image links into embedded base64 encoded images (for models which do not support image links at all). Hence, I would really love to see it handling this limit internally and converting image links into base64 embedded images once this limit has been reached.

Motivation, pitch

See above

What part of LiteLLM is this about?

Proxy

LiteLLM is hiring a founding backend engineer, are you interested in joining us and shipping to all our users?

No

Twitter / LinkedIn details

No response

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

litellm - 💡(How to fix) Fix [Feature]: Handle 10 Image Link Limit on Vertex AI [1 comments, 2 participants]