diff --git a/deploy/nginx/ai.51easyai.com-cluster.conf b/deploy/nginx/ai.51easyai.com-cluster.conf index d3f31e1..ebae2e1 100644 --- a/deploy/nginx/ai.51easyai.com-cluster.conf +++ b/deploy/nginx/ai.51easyai.com-cluster.conf @@ -56,6 +56,26 @@ server { proxy_pass http://easyai_gateway_api; } + # Gemini and OpenAI native compatibility routes are intentionally exposed + # without the /api prefix. Keep them on the API upstream instead of allowing + # the catch-all Web location to return 405 for valid provider requests. + location ~ ^/v1(?:beta)?/ { + proxy_http_version 1.1; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto https; + proxy_set_header Connection ""; + proxy_connect_timeout 2s; + proxy_send_timeout 3600s; + proxy_read_timeout 3600s; + proxy_request_buffering off; + proxy_buffering off; + proxy_next_upstream error timeout http_502 http_503 http_504; + proxy_next_upstream_tries 2; + proxy_pass http://easyai_gateway_api; + } + location /gateway-api/ { proxy_http_version 1.1; proxy_set_header Host $host;