Google gemini- User location is not supported for the API use #6464
Unanswered
jquiros2
asked this question in
Troubleshooting
Replies: 2 comments
-
Switched to vertexAI for it to work. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I've encountered a similar issue. I've got Librechat running on remote server from under docker. However unlike in the case of @jquiros2 direct curl queries from LibreChat-API container work smoothly, but LibreChat itself throws an error [400 Bad Request] User location is not supported for the API use." Switching to VertexAI indeed helps, but the latter lacks the latest models. any ideas how to troubleshoot this? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Am using 0.7.7.
For some reason I am getting this from Google's API now:
Something went wrong. Here's the specific error message we encountered: { "type": "undefined", "info": "[GoogleGenerativeAI Error]: Error fetching from https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:streamGenerateContent?alt=sse: [400 Bad Request] User location is not supported for the API use." }
I checked availability regions for the API, and all good. LibreChat is in LA, USA, web browser in El Salvador.
Checked that "curl ipinfo.io" on each of these returns one of those two countries.
So I figured it was something temporary with google api access, but status shows up.
So i tried this from librechat server and my local computer but in both cases it works fine:
curl -X POST
-H "Content-Type: application/json"
-H "x-goog-api-key: Your API Key"
-d '{
"contents": [{
"parts": [{
"text": "Write a short poem about the ocean."
}]
}]
}'
"https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent"
But I tried it from within the LibreChatp-API container and it fails.
I don't believe I have any proxies or vpn's enabled no this server. Any tips on what else to check?
Beta Was this translation helpful? Give feedback.
All reactions