#Does user_location in web_search_options work?

4 messages · Page 1 of 1 (latest)

open trail
#

Sending the following payload seems always result in options from Charlotte, North Carolina (no idea why that location)

{
"web_search_options": {
"search_context_size": "low",
"user_location": {
"type": "approximate",
"approximate": {
"country": "Albania"
}
}
},
"temperature": 0.7,
"model": "openai/gpt-4o-mini-search-preview",
"messages": [
{
"role": "system",
"content": "You are a helpful AI assistant.",
"refusal": null,
"reasoning": null,
"annotations": null
},
{
"role": "user",
"content": "test",
"refusal": null,
"reasoning": null,
"annotations": null
},
{
"role": "assistant",
"content": "Hello! It seems you've entered "test." Could you please provide more context or specify what information you're seeking? This will help me assist you more effectively. ",
"refusal": null,
"reasoning": null,
"annotations": null
},
{
"role": "user",
"content": "list the local companies",
"refusal": null,
"reasoning": null,
"annotations": null
}
],
"reasoning": {},
"max_tokens": 2000,
"tools": null,
"location": null
}

proven coyoteBOT
#

I'm an AI assistant - my answers may be incorrect and I cannot see screenshots. Please verify information with the OpenRouter docs.

I don't have specific documentation to quote for how the user_location parameter in web_search_options is handled when using OpenRouter's API, or why results would default to Charlotte, North Carolina. The official documentation does not mention web_search_options or user_location as supported fields for search context or routing, nor does it describe any geolocation-based behavior for result selection in API responses.

To get a definitive answer or report this unexpected behavior, please contact mods through the Discord server. Also, you may want to check for updates or clarifications in the OpenRouter docs directly.

-# This is an automated response. Use !mute to stop the bot from responding.

OpenRouter

The unified interface for LLMs. Find the best models & prices for your prompts

open trail
#

🙁

thorn bloom
#

Openrouter is effectively a proxy, so OpenAI’s tools will see their IP and use its estimated location.