Generate object error User location is not supported for the API use

Hi there.

We’re using Typescript SDK, so in Bun/Node you can simply say dns.setDefaultResultOrder("ipv6first").

Not sure what the Python equivalent would be.

1 Like

I see thank you ! Is there anything to be done on server side ? I mean like something to configure regarding the hetzner instance ? (networking or firewalls etc..)

With Node/Bun, dns.setDefaultResultOrder("ipv6first") in the app is sufficient to prioritize IPv6 addresses in name lookups. No need to change the server configuration.

If you want to prefer IPv6 system-wide, you could try adding this line to /etc/gai.conf:

precedence ::/0  100

Be prepared that this could impact other things you have running on the server.

Interesting thank you ! I might have some reading to do on the possible impacts of IPv6 switch then :thinking:

Same issue here from a machine in a Scaleway data center in Paris, France :france:
All worked fine last week but now, i get this “User location is not supported for the API use” error from Google.

We fixed this by using another IPv6 on our machine.

2 Likes

Thank you for the confirmation Steve ! Even though I already asked the question to OP, amma ask it again to you :slight_smile: What was your approach to use IPv6 on the machine ? and did it have any border effects that was not expected ?
Thanks !

We have a litellm instance on this machine, and litellm uses IPv6 by default. (We can set it to use IPv4 but we haven’t done it).
No border effect for now…

1 Like

That’s really interesting insight thank you ! (btw frenchie here too :smiley:) I’m curious to know if you’re going through a (LiteLLM) proxy server or just going through their (Python) SDK and why this choice ? (guess to be able to easily swap LLMs in the future)
Last Q: How’s LiteLLM doing for you ? Was eyeing migrating my “LLM” code layer to it but for now still going through the classic SDK for the different providers that I’m using (Gemini, Groq, etc..).

This helped me for Hetzner docker container node:22

Using paid account here. and all of a sudden, I got whacked with this error? what is going on with google?

Also paid account here. Quite puzzled by the lack of support.

A Google employee did post this link to report IP problems in another thread:

YMMV. We went with the IPv6 workaround.