AI Studio publish now overwrites the Gemini API key. You need to replace them manually, for now I hope. From the publish screen in AIS, select Manage in Google Cloud. Select ‘Edit and Deploy new revision’. In both containers (nginx and app) select the Variables and Secrets. In the Environment Variables your GEMINI_API_KEY value will probably be empty. Add your API key into the value box. Repeat for the app container, adding the API key value if missing, unless the value is stored as a secret, in which case do not add the key in the environmental variables. Press Deploy. I used Claude to guide me through this.
It needs to be repeated every time you publish until they fix it.