Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

[Bug]: Gemini API via Vertex AI sometimes repeats the ending words in stream responses.

Problem you have encountered:

Gemini Vertex AI API sometimes repeats the ending phrase or words in response. This includes the repetition of last words or last sentences.

What you expected to happen:

API response without repetition of ending words or phrases

Steps to reproduce:

Call this curl command in Postman multiple times and you will notice the ending sentence repeated twice. https://drive.google.com/file/d/14zu0oXH3vUfVUuhmp-2BiwvzUDTbC75g/view?usp=sharing

Solved Solved
2 3 1,894
1 ACCEPTED SOLUTION

Just an update that this issue has been resolved already. More details here.

View solution in original post

3 REPLIES 3

Hi there!

I'm facing the same issue with repeating words at the end of response. Even if you test Gemini in vertex AI Studio you can get the same behaviour.

Hello, I've been having the same issue for over a week now. I've tested different types of prompting and parameters, but the ending phrase is still repeating. 

Just an update that this issue has been resolved already. More details here.