If Gemini does not respond or reports an error

#2
by lingdongs - opened

This situation occurs in the following scenarios: when no character settings or preset messages are used, and sensitive words are sent.
INFO: 10.16.34.189:39844 - "POST /v1/chat/completions HTTP/1.1" 200 OK
FAKE STREAMING: Making non-streaming request to Gemini API (Model: gemini-2.5-pro-preview-03-25)
Error in fake_stream_generator: object of type 'NoneType' has no len()

lingdongs changed discussion title from If Gemini does not respond or reports an error, to If Gemini does not respond or reports an error

I added more error handling. I hope it can give better error messages.

lingdongs changed discussion status to closed
lingdongs changed discussion status to open

FAKE STREAMING: Making non-streaming request to Gemini API (Model: gemini-2.5-pro-preview-03-25)
DEBUG: Response has prompt_feedback with block_reason: BlockedReason.PROHIBITED_CONTENT, considering it valid for processing.
INFO: Using in-memory credential for project: august-tangent-457006-a1 (Source: json_string)
INFO: Using rotated credential for project: august-tangent-457006-a1
Processing auto model: [PAY]gemini-2.5-pro-preview-03-25-auto
Auto-mode attempting: 'base' for model gemini-2.5-pro-preview-03-25
Converting OpenAI messages to Gemini format...
Converted to 2 Gemini messages
INFO: 10.16.21.84:54643 - "POST /v1/chat/completions HTTP/1.1" 200 OK

Are you talking about auto retry not working for fake stream mode? I fixed this in the newest version.

lingdongs changed discussion status to closed

Sign up or log in to comment