getcursor / cursor

The AI Code Editor
https://cursor.com
25.76k stars 1.6k forks source link

Support base_url for Anthropic Series Models #1936

Open Hambaobao opened 2 months ago

Hambaobao commented 2 months ago

Dear Developers,

We hope you can enable the Anthropic series models to allow specifying a base_url, just like the OpenAI series models.

Thank you!

danperks commented 2 months ago

If you only want to use Anthropic models, I believe overriding the OpenAI URL will actually override the URL for all the customer API key endpoints, so try enter it in there and give it a test - I may be wrong!

Hambaobao commented 2 months ago

Thank you for your response.

I have conducted some tests and discovered that overriding OpenAI’s base_url successfully allows me to invoke models whose names do not include claude-. However, when the model name contains claude-, Cursor still appears to call the model through https://api.anthropic.com/v1/messages. Currently, I have aliased claude-3-5-sonnet-20240620 as custom-cursor. Nonetheless, I suspect that Cursor uses different prompts and post-processing methods when invoking different models, as the user experience with the current setup feels significantly inferior to the native experience.

Therefore, I believe it is necessary to provide a similar base_url modification feature for the Anthropic series of models.

SKDDJ commented 1 month ago

Thank you for your response.

I have conducted some tests and discovered that overriding OpenAI’s base_url successfully allows me to invoke models whose names do not include claude-. However, when the model name contains claude-, Cursor still appears to call the model through https://api.anthropic.com/v1/messages. Currently, I have aliased claude-3-5-sonnet-20240620 as custom-cursor. Nonetheless, I suspect that Cursor uses different prompts and post-processing methods when invoking different models, as the user experience with the current setup feels significantly inferior to the native experience.

Therefore, I believe it is necessary to provide a similar base_url modification feature for the Anthropic series of models.

Yes, it would be great if the cursor could support changing the Claude base URL.

lem0ke commented 2 weeks ago

Thank you for your response.

I have conducted some tests and discovered that overriding OpenAI’s base_url successfully allows me to invoke models whose names do not include claude-. However, when the model name contains claude-, Cursor still appears to call the model through https://api.anthropic.com/v1/messages. Currently, I have aliased claude-3-5-sonnet-20240620 as custom-cursor. Nonetheless, I suspect that Cursor uses different prompts and post-processing methods when invoking different models, as the user experience with the current setup feels significantly inferior to the native experience.

Therefore, I believe it is necessary to provide a similar base_url modification feature for the Anthropic series of models.

I agree with you.