cursor icon indicating copy to clipboard operation
cursor copied to clipboard

Add BaseURL for openai

Open Travis-55 opened this issue 2 years ago • 10 comments

add a feature where u can add BasePath for openai

Travis-55 avatar Sep 09 '23 09:09 Travis-55

I'd also like to see this feature implemented, I am using OpenRouter and this would be very helpful to me.

blankuserrr avatar Sep 10 '23 22:09 blankuserrr

Yeah this would be game-changing.

EIIisD avatar Oct 08 '23 07:10 EIIisD

bump

tranhoangnguyen03 avatar Oct 29 '23 08:10 tranhoangnguyen03

Yes this would be amazing to not be stuck with GPT4

tonydavis629 avatar Mar 08 '24 23:03 tonydavis629

This is already implemented and can be closed, just use your API endpoint for example OpenRouter in cursor settings > OpenAI > Override OpenAI Base URL:

https://openrouter.ai/api/v1

Currently the functionality is limited to models that are not currently available in Cursor, such as the mistralai/codestral-mamba model

sFritsch09 avatar Sep 05 '24 12:09 sFritsch09

@sFritsch09 I'm getting Invalid OpenAI API Key, despite setting my base URL. It looks like the request isn't even going to my endpoint.

image

Manouchehri avatar Sep 06 '24 11:09 Manouchehri

@Manouchehri Try the following:

  • Turn on OpenAI API Key
  • add Base URL: https://openrouter.ai/api/v1
  • click save
  • add your openrouter token
  • click verify

sFritsch09 avatar Sep 06 '24 11:09 sFritsch09

@sFritsch09 I got it working, it's because of CORS.

Manouchehri avatar Sep 06 '24 13:09 Manouchehri

@sFritsch09 I got it working, it's because of CORS.

Can you give a bit more details? Currently i cannot find a way to use openrouter in cursor

vale46n1 avatar Sep 16 '24 20:09 vale46n1

@sFritsch09 I got it working, it's because of CORS.

@sFritsch09 I got it working, it's because of CORS. i have encountered the same problem, how did you fix it @Manouchehri

hujh818 avatar Sep 27 '24 11:09 hujh818