为啥在 openrouter 可以使用 gemini pro 2.0 的模型,而把 openrouter 的 api 放到 cherystudio 中就不行

183 天前
 SlanWyf

openrouter 的 gemini 2.0 有两个提供商,一个是 Google Vertex ,一个是 Google AI Studio 。在 openrouter 官网,这两个提供商的模型使用都没问题,但是在 cherystudio 中配置完 openrouter 的 api 调用 Gemini 的模型,一定概率会报错,错误信息为

	"code": 400,
    "metadata": {
      "raw": "{\n  \"error\": {\n    \"code\": 400,\n    \"message\": \"User location is not supported for the API use.\",\n    \"status\": \"FAILED_PRECONDITION\"\n  }\n}\n",
      "provider_name": "Google AI Studio"
    }

这个是为啥,我配置的 api 是 openrouter 的 api ,我并没有直接待用 google 的模型。我理解这两种方式都是 openrouter 去调用谷歌的 api 的,为啥使用 openrouter 的 api 会报这个错呢

2120 次点击
所在节点    OpenAI
6 条回复
noobjalen
183 天前
用户位置不支持 API 使用。
SlanWyf
183 天前
@noobjalen 我知道啊,我的意思的是,我是调的 openrouter 的 api ,应该是由 openrouter 去调用 google 的 api 吧,为啥会这样,如果 openrouter 调用 google 的 api 也有问题,为啥在 openrouter 的官网使用就没问题呢
XnEnokq9vkvVq4
183 天前
据我了解某些上游(比如 openai )会让 openrouter 这种比较大的中转商上报用户的 ip 地址,所以当你调用 openrouter 的 endpoint 的时候最好也套一层代理
TimePPT
182 天前
@hanqian 是的,御三家的 TOS 都有地区要求,且要求三方代理商回传用户地区信息作为判断依据。
liyolo98
181 天前
cherystudio 设置代理,应该就行了
sfy
138 天前
需要魔法上网翻墙

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/1120329

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX