Hello Netlify team,
I am encountering a persistent issue with serverless functions after deployment and I would really appreciate your guidance.
Site information
Netlify site name:
(albproject.netlify.app)
Custom domain:
https://www.arabicbank.info
Repository:
(GitHub - AymanEddakrouri/ALB: Arabic Language Bank · GitHub)
Project setup
Framework: React
Build tool: Vite
AI API: Google Gemini
Serverless function file: gemini.ts
Description of the issue
My website deploys successfully and loads normally, but three AI-powered tools on the site stop working after deployment.
These tools send POST requests to a serverless function which calls the Gemini API to process Arabic text and return analysis results.
Observed behavior
-
Everything works perfectly in my local development environment (localhost).
-
The same requests also work correctly when tested directly in Google AI Studio.
-
However, after deployment the tools fail to execute.
Deployment testing
I tested the same project on both platforms:
Netlify
Vercel
In both cases the website deploys successfully, but the three AI tools fail with execution errors.
Affected tools
Smart Academic Paraphraser
Academic Style Auditor
Deep Linguistic Analyzer
Important observations
The frontend loads correctly.
API requests work correctly on localhost.
The failure only occurs after deployment.
The same issue occurs on both Netlify and Vercel deployments.
Because of this behavior I suspect the issue might be related to one of the following:
Serverless runtime configuration
Environment variables
API request handling inside the serverless function
If needed, I can provide the serverless function code (gemini.ts) and the full repository.
Thank you very much for your time and support.