{openai-subdivision-1-iso-code} header missing

Hello,
From ChatGPT documentation:

Currently, we will be sending the user’s country and state in the Plugin conversation header (if you are in California, for example, it would look like {"openai-subdivision-1-iso-code": "US-CA"}
Source:https://platform.openai.com/docs/plugins/introduction

Has ChatGPT stopped sending user location? I checked the requests headers and don’t see "openai-subdivision-1-iso-code being sent anymore.

{'host': 'localhost:8000', 'connection': 'keep-alive', 'content-length': '21', 'sec-ch-ua': '"Not.A/Brand";v="8", "Chromium";v="114", "Google Chrome";v="114"', 'dnt': '1', 'sec-ch-ua-mobile': '?0', 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36', 'openai-ephemeral-user-id': 'xxx', 'content-type': 'application/json', 'openai-conversation-id': 'xxx', 'sec-ch-ua-platform': '"Windows"', 'accept': '*/*', 'origin': 'https://chat.openai.com', 'sec-fetch-site': 'cross-site', 'sec-fetch-mode': 'cors', 'sec-fetch-dest': 'empty', 'accept-encoding': 'gzip, deflate, br', 'accept-language': 'en-US,en-GB;q=0.9,en;q=0.8'}

2 Likes

@andrey-openai can you please take a look at this?

Is this with a localhost plugin? (I see 'host': 'localhost:8000')

2 Likes

@isaac_oai Yes. Do you not send location information if using a localhost?

I had the same issue. The header is only available for remote servers, not for localhost

1 Like

Thank you. I appreciate it. I’ll test it and report back.

Correct, we only send it to remote hosts - the localhost environment is a bit different (requests come from the browser, not our servers) so there are a few things that differ (especially around headers; another example is that you can’t use authorization flows).

While localhost plugins can be a useful way to develop and even have a few unique use cases, they do have some subtle differences to remote plugins. If you are developing a plugin that’s intended to be deployed remotely and you want close to 100% parity with the deployment case, I recommend using either a cloud-first dev environment like https://replit.com/ or port forwarding like https://ngrok.com/

Hope that helps!

PS You said you don’t see the header “being sent anymore”, but to my knowledge we never sent the header to localhost plugins - was this different for you at some point?

I moved the app to a server and I can see the “openai-subdivision-1-iso-code” header.

Re: You said you don’t see the header “being sent anymore”, but to my knowledge we never sent the header to localhost plugins - was this different for you at some point?

I’m sorry, I was under the impression that you guys don’t see the header anymore, irrespective of the plugin being hosted locally or on a server.

Since last couple of days they stopped sending the user’s location. Hope you will fix this asap.

1 Like