logancyang / obsidian-copilot

THE Copilot in Obsidian
GNU Affero General Public License v3.0
2.54k stars 176 forks source link

Cannot use Claude 3 with error message "request not allowed" #369

Closed haluwong closed 1 week ago

haluwong commented 5 months ago

Filled the Claude 3 API Key, select Claude 3 and Chat. Error type: forbidden, Message: request not allowed.

Obsidian-copilot version: 2.5.2 Obsidian: v 1.5.8 (Linux AppImage)

image

Do anyone has same problem?

JasonL708 commented 5 months ago

I have run into a similar problem. I am using Openrouter and whenever I set the model to Anthropic's model, then I will get the error. If I switched to other models then it works fine.

image

logancyang commented 5 months ago

@haluwong 403 should mean the server got your request but authentication failed. Can you try re-enter the API key?

@JasonL708 OpenRouter nowadays has :free appended to their free models, not sure if this is because they require payment from you for Claude models.

haluwong commented 5 months ago

@haluwong 403 should mean the server got your request but authentication failed. Can you try re-enter the API key?

@JasonL708 OpenRouter nowadays has :free appended to their free models, not sure if this is because they require payment from you for Claude models.

@logancyang The API Key is correct, we have tested it through python in a US server. However, our obsidian is not running in US region, maybe it's the possible cause of 403!? We have tried to open Obsidian with --proxy-server, but it seems it didn't use it when using Claude 3 model. (OpenAI did access through our proxy as we see log in our proxy server but not for Claude 3)

logancyang commented 5 months ago

@haluwong I see. Claude 3 is using a proxy server of its own. You can check the code and disable it by setting the ChatAnthropic URL back to the real claude URL. Then it should use your proxy server.

hulijiashaonian commented 2 months ago

@haluwong I see. Claude 3 is using a proxy server of its own. You can check the code and disable it by setting the ChatAnthropic URL back to the real claude URL. Then it should use your proxy server.

I encountered the same issue. Could you please elaborate on your solution?