by judging by your error code, try to explicity add "details" variable in your model class GenerateContentResponse, try to create a custom response in case any GenerateContentResponse block it might have.