anthropics / anthropics/anthropic-sdk-python

tools.0.web_search_20250305: Country code SG is not supported

未关闭
#995 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
api
主要语言
Python
星标
3.9k
派生
853
平均合并
1 天 11 小时
30 天内合并 PR
10

描述

According to code comment on [UserLocation](https://github.com/anthropics/anthropic-sdk-python/blob/main/src/anthropic/types/web_search_tool_20250305_param.py#L22), country code in ISO_3166-1_alpha-2 are support but when testing with Singapore, it returns 400.
If not all countries listed in ISO_3166-1_alpha-2 are supported, where do we find the actually list of supported country? Thanks.

Tool
{
"type": "web_search_20250305",
"name": "web_search",
"user_location": {
"type": "approximate",
"country": "SG",
"city": "Singapore",
"region": "Singapore",
"timezone": "Asia/Singapore"
}
}

Error Message
BadRequestError: Error code: 400 - {'type': 'error', 'error': {'type': 'invalid_request_error', 'message': 'tools.0.web_search_20250305: Country code SG is not supported.'}}

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。