Gemini gives different results locally and on Cloud Run

on Vertex AI produced noticeably different results when the same code ran locally and on a Cloud Run deployment. The difference was not just wording; extracted values could change. The setup used Python 3.x, 2.8.0, and a Docker-based Cloud Run deployment.

The checked inputs and settings were the same: source code, prompt, , input image and text, , model name, temperature, top_p, top_k, maximum , SDK version, Docker image, input file, and project. The open question is whether Gemini can still be non- when temperature is set to 0, or whether some hidden difference in Vertex AI or Cloud Run is being missed.

Key points

  • returned different results locally and on Cloud Run.
  • The changed output included extracted values, not only different wording.
  • The code, prompt, input, model settings, Docker image, SDK version, and project were checked as identical.
  • temperature set to 0 may still not guarantee a fully fixed answer.
  • Production workflows should log and validate Gemini outputs before using them.
Read original