I use gemini-1.5-pro-preview-0409 model via API, get error: Socket closed

Using the gemini-1.5-pro-preview-0409 model through the API, but when the number of tokens is high (10k), the server directly reports 'Socket closed'.

adorehb_0-1713321432467.png

 

4 1 531
1 REPLY 1

You must be reaching either the input or the output token limit for 1.5 version:

Input token limit 1048576
Output token limit 8192

The model is in preview state, it may lack support and is unstable vs GA models available at the moment.

Ref: