sourcegraph / jetbrains

Apache License 2.0
70 stars 23 forks source link

JetBrains: "User location is not supported for the API use" error occurred for Gemini LLMs. #2138

Closed jay-fibi closed 2 months ago

jay-fibi commented 2 months ago

IDE Information

PyCharm 2023.3.3 (Community Edition) Build #PC-233.13763.11, built on January 26, 2024 Runtime version: 17.0.9+7-b1087.11 aarch64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. macOS 14.3 GC: G1 Young Generation, G1 Old Generation Memory: 2048M Cores: 8 Metal Rendering is ON Non-Bundled Plugins: com.sourcegraph.jetbrains (6.0.34)

Bug Description

Platform: macOS

Steps to reproduce:

  1. Have Cody plugin installed in your JB IntelliJ editor
  2. Login to Cody with Free/Pro user
  3. Open Cody Window and choose Gemini 1.5 Pro or Gemini 1.5 Flash LLM
  4. Run command Explain Code for any code snippet

Observed behavior:

Following error message displayed, "Error: Sourcegraph Cody Gateway: unexpected status code 400: { "error": { "code": 400, "message": "User location is not supported for the API use.", "status": "FAILED_PRECONDITION" } } "

Expected behavior:

Error should not occur and user should be able to use both these LLMs

Additional context

Screenshot:

Screenshot 2024-08-28 at 2 37 46 AM
taylorsperry commented 2 months ago

created linear issue https://linear.app/sourcegraph/issue/CODY-3535/jetbrains-user-location-is-not-supported-for-the-api-use-error

taylorsperry commented 2 months ago

I believe this has been fixed (internal context https://sourcegraph.slack.com/archives/C07KA67A0UR/p1724862498546059). @jay-fibi could you let me know if you're still seeing this error, please?

jay-fibi commented 2 months ago

@taylorsperry this issue is resolved now. Closing the ticket.