lobehub / lobe-chat

🤯 Lobe Chat - an open-source, modern-design AI chat framework. Supports Multi AI Providers( OpenAI / Claude 3 / Gemini / Ollama / Azure / DeepSeek), Knowledge Base (file upload / knowledge management / RAG ), Multi-Modals (Vision/TTS) and plugin system. One-click FREE deployment of your private ChatGPT/ Claude application.
https://chat-preview.lobehub.com
Other
42.06k stars 9.48k forks source link

[Bug] both gemini-1.5-pro-001and gemini-1.5-pro-002 reach errorcode 429 when prompt contains ~30k tokens. #4239

Closed xinbada007 closed 1 hour ago

xinbada007 commented 2 hours ago

📦 Environment

Vercel

📌 Version

1.21.3

💻 Operating System

Ubuntu

🌐 Browser

Chrome

🐛 Bug Description

Hi,

Recently I (google gemini free-tier user) constantly encounter errorcode 429 when using both gemini-1.5-pro-001 and gemini-1.5-pro-002 together with knowledge base, even I take 2~10 mintues break upon every 429 error.

After a while I found that if I do following (1~2 with knowledge base on, 3 with knowledge base off):

  1. switch to gemini-1.5-pro-exp-0827 or
  2. limit conversation history to reduce token used to drastically smaller than 30k while stick to gemini-1.5-pro-001/002 or
  3. switch off knowledge base, no limitation on conversation history (token used is nearly 30k), use gemini-1.5-pro-001/002

1~3 then all good.

In summary, it seems that knowledge base together with ~30k token prompts are somewhat in conflict with gemini-1.5-pro-001/002. I'm not sure if this is caused by Google but given that without knowledge base I can use gemini-1.5-pro-001/002 with ~30k token prompts (see 3.) vs. I can also use gemini-1.5-pro-exp-0827 together with knowledge base and 30k token prompts (see 1.), my guess would be there shoudn't be any bug on the google side.

📷 Recurrence Steps

  1. open a topic and use knowledge base (in my case I used a 6-page paper).
  2. do some chats till tokens used reach ~30k.
  3. keep chatting with knowledge base and tokens used ~30k, you will soon see 429 error and it is not recoverable.
  4. If you want to see if this is a bug in google side, simply switch model to gemini-1.5-pro-exp-0827 and everything seems fine.

🚦 Expected Behavior

No 429 error

📝 Additional Information

No response

lobehubbot commented 2 hours ago

👀 @xinbada007

Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible. Please make sure you have given us as much context as possible.\ 非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

xinbada007 commented 1 hour ago

Ok solved, checked the quota limit:

每分钟 2 次 32,000 TPM 50 RPD

reached 32k tokens per minute limit

please close this thread

lobehubbot commented 1 hour ago

✅ @xinbada007

This issue is closed, If you have any questions, you can comment and reply.\ 此问题已经关闭。如果您有任何问题,可以留言并回复。