openpilot-hub / devpilot-intellij

Your new coding buddy, designed exclusively for IntelliJ IDEA.
https://devpilot.zhongan.com
Apache License 2.0
600 stars 96 forks source link

SSO accounts cannot use Devpilot #33

Closed Armando200108 closed 6 months ago

Armando200108 commented 6 months ago

Describe the bug When using the AI Gateway service to log in to Devpilot, it cannot be used normally regardless of whether it is a ZA Online account or a ZA Tech account. The chat function prompts "Chat completion failed".

To Reproduce Steps to reproduce the behavior:

  1. Select the service as AI Gateway in IntelliJ IDEA settings
  2. Select ZA Online SSO or ZA Tech SSO, use OAuth2 to log in, normal callback, and the plugin prompts that the login is successful.
  3. Chat with the model in the plugin’s chat function

Expected behavior The plugin should return the answer to a question normally instead of prompting Chat completion failed

Environment (please complete the following information):

Additional context Code completion is also unavailable and no error message is output.

Armando200108 commented 6 months ago

Feel sorry! Because in all environments I have configured a virtual private network based on a virtual network adapter, and have set up a proxy in my IDE to point to that virtual network adapter, obviously API Gateway is not within its reach. As a result, Devpilot is not available in any of my environments. As for why SSO can log in, the reason is that I wrote forwarding rules for my virtual network adapter. The domain name of SSO is not within the forwarding rules, so SSO accessed through Chrome cannot There will be a connection failure problem.

To solve this problem, you can set rules for API Gateway in the virtual network adapter to ensure that the domain name is not connected through the VPN. You can also set proxy rules in IDEA to exclude the domain name of API Gateway from the proxy rules.

I hope friends with the same problem can refer to it.