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 会报这个错呢
1 noobjalen 202 天前 用户位置不支持 API 使用。 |
![]() | 2 SlanWyf OP @noobjalen 我知道啊,我的意思的是,我是调的 openrouter 的 api ,应该是由 openrouter 去调用 google 的 api 吧,为啥会这样,如果 openrouter 调用 google 的 api 也有问题,为啥在 openrouter 的官网使用就没问题呢 |
![]() | 3 XnEnokq9vkvVq4 202 天前 ![]() 据我了解某些上游(比如 openai )会让 openrouter 这种比较大的中转商上报用户的 ip 地址,所以当你调用 openrouter 的 endpoint 的时候最好也套一层代理 |
5 liyolo98 200 天前 cherystudio 设置代理,应该就行了 |
6 sfy 157 天前 via iPhone 需要魔法上网翻墙 |