V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
SlanWyf
V2EX  ›  OpenAI

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

  •  
  •   SlanWyf · 4 天前 · 572 次点击

    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 会报这个错呢

    5 条回复    2025-03-24 11:17:50 +08:00
    noobjalen
        1
    noobjalen  
       4 天前
    用户位置不支持 API 使用。
    SlanWyf
        2
    SlanWyf  
    OP
       4 天前
    @noobjalen 我知道啊,我的意思的是,我是调的 openrouter 的 api ,应该是由 openrouter 去调用 google 的 api 吧,为啥会这样,如果 openrouter 调用 google 的 api 也有问题,为啥在 openrouter 的官网使用就没问题呢
    hanqian
        3
    hanqian  
       4 天前   ❤️ 1
    据我了解某些上游(比如 openai )会让 openrouter 这种比较大的中转商上报用户的 ip 地址,所以当你调用 openrouter 的 endpoint 的时候最好也套一层代理
    TimePPT
        4
    TimePPT  
       4 天前 via Android
    @hanqian 是的,御三家的 TOS 都有地区要求,且要求三方代理商回传用户地区信息作为判断依据。
    liyolo98
        5
    liyolo98  
       2 天前
    cherystudio 设置代理,应该就行了
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1018 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 19:58 · PVG 03:58 · LAX 12:58 · JFK 15:58
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.