Internal Server Error for some requests to models/gemini-1.5-pro-latest

This query used to work (and intermittently still works) with models/gemini-1.5-pro-latest, but now more frequently fails than not. It also works with models/gemini-1.5-flash.

Error raised while executing method <function GeminiAPI.generate_text at 0x32e5d5a2a980>:
GeminiAPI.generate_content raised err:
500 An internal error has occurred. Please retry or report in Troubleshooting guide  |  Gemini API  |  Google AI for Developers [detail: “Fail to execute model for flow_id: gemini_v2_mpp_001_32k_eu_2m_us\nError: 864:INVALID_ARGUMENT: Executable(jit_slice_in) expected parameter 39 of size 36499456 (s8[2,2128,8512]{2,1,0:T(8,128)(4,1)}) but got buffer with incompatible size 37044224 (s8[2,2128,8512]{1,2,0:T(8,128)(4,1)}); from run id 21791; from run id 21827; from run id 21829; from run id 21840; from run id 22234; from run id 22466; from run id 22603; from run id 22799; from run id 22818; from run id 23609; from run id 23909; from run id 23912; from run id 24036; from run id 24293; from run id 25022; from run id 25530; from run id 26042; from run id 26723; from run id 27084; from run id 27653; from run id 28311; from run id 28589; from run id 28620; from run id 28843; from run id 29710; from run id 29862; from run id 31113; from run id 32891; from run id 33184; from run id 33295; from run id 33619; from run id 33983; from run id 35353; from run id 35540; from run id 36663; from run id 36785; from run id 37226;…(length 900079)”
]
for request:
[‘Here is a list of available tools:\n’
‘\n’
‘Tool name: resolve_to_coordinates\n’
'Tool descript

Hmm, this happens for models/gemini-1.5-pro-latest and models/gemini-1.5-pro-001 but not models/gemini-1.5-pro-002… Or it’s just random, can’t tell.

Welcome to the forum. It has been random, with the anecdotal observation that the -0827 model exhibits less http status 500. The most effective recommendation I have is to use retry with both 429 and 500 http status codes (Wierd Error when calling api - #4 by OrangiaNebula ) or with 429, 500 and 503 (Why always getting Status 429? Very frustrating - #17 by OrangiaNebula).

Sorry, do you mean models/gemini-1.5-pro-0827 ? For that one I’m getting:

ValueError: Model models/gemini-1.5-pro-0827 not available.

That‘s because it is named models/gemini-1.5-pro-exp-0827. Tip: always use list_models (documentation in Models  |  Gemini API  |  Google AI for Developers) to retrieve the actual model names, the list varies over time as models are introduced and older models get retired.

2 Likes

seeing internal error intermittently today , any fix ?