Let us use the real DeepSeek API [Workaround Included!]

I noticed that you’ve integrated Deepseek R1 through your provider to comply with privacy regulations, and I understand the resulting slowdown.

However, just as we can add our own API keys for other models, I would like the option to use our DeepSeek API key as well. I tried using OpenRouter, but it seems slower compared to the actual DeepSeek API.

Is there any ongoing work to implement this feature?

I think you should be able to use deepseek api keys by overriding OpenAI base URL . I believe deepseek is OpenAI protocol compatible

1 Like

Sadly that does not work, Cursor tries to send some parameters to it that does not exist

{“error”:{“message”:“deepseek-reasoner does not support successive user or assistant messages (messages[1] and messages[2] in your input). You should interleave the user/assistant messages in the message sequence.”,“type”:“invalid_request_error”,“param”:null,“code”:“invalid_request_error”}}

Here is a workaround method for anyone that wants to use the official DeepSeek API with Cursor:

Api: https://api.deepseek.com/v1
Model: deepseek-reasoner

Delete .cursorrules and make sure the Rules are empty in the cursor settings.

Switch to Chat mode and do not have your file attached as context

What you can do instead, is copy your entire file’s content and paste it in chat so it becomes like this:

Submit and it will work, not very intuitive but a good workaround so we don’t hop back and forth to the deepseek website, and still have the speed from the main API.

3 Likes

thanks - I did not notice the very small yet critical dropdown that says “Override OpenAI base url” for some time…

Where do we go to enter the API information? I’m very new to Cursor and didn’t see how to do this.

UPDATE: OpenRouter is actually really fast. The problem is the “providers” tab

It automatically picks one for you for each request, which can be both costly and slow. To fix this, go to your settings and ignore the providers so it’s only DeepSeek

If you do it this way, you can use OpenRouter just fine and you’ll get really fast responses, you won’t be limited by not being able to attach your code as context ( no need to copy paste your code into chatbox anymore )

I hope you don’t do that for anything touching production code serving anyone in the EU.

This is not helpful or adds any value to this conversation other then fear mongering. We appreciate Tibit’s workaround to give other options to cursor.

1 Like

It is not fear-mongering, just a reminder that the EU has stringent regulations that can get your company in trouble, GDPR requires data to be processed in the EU of in a country deemed “adequate”. There’s plenty of compliant providers that offer R1.

1 Like

i still hope cursor considers adding deepseek as a provider as i like to use apis from the official platform provider. still getting hit with

{"error":{"message":"deepseek-reasoner does not support successive user or assistant messages (messages[1] and messages[2] in your input). You should interleave the user/assistant messages in the message sequence.","type":"invalid_request_error","param":null,"code":"invalid_request_error"}}

1 Like

pure protectionism. official servers have better tuning and it’s not everything that’s open sourced.

I hope to provide more open and compatible API support.

I am even willing to pay for Cursor itself, as a superior development experience stems more from Cursor than from the LLM. It is Cursor that spares you the maddening switching and copy-pasting between the browser and the IDE.

However, I also wish to have my own choices. Everyone’s choices should be respected, whether you’re from the United States or Europe.

is this still working? for some reason it’s no longer possible to obtain API key from DS website