Can't use claude 3.5 sonnet with openrouter, seems like a cursor issue
Using cursor on windows 11. Was working till very recently, at leas until last friday.
If I use anthropic/claude-3.5-sonnet i get error Invalid API key.
On verify API key in the model preferences, I pass the tests. I can leave only anthropic/claude-3.5-sonnet, and it works, but if I add an error like anthropic/claude-3.5-sonnetasdadd, verify will fail.
I'm using the same setup in other custom clients and it's working.
does not work for me at all anymore, can get it to work now and then when i try to use it with pro (once in a while) - i just get an error that it can't reach openai. Its a bit sad because gpt 4 is extremely stupid and useless compared to claude 3.5.
hey so if anyone else has issues and has to keep reopening for it to work, i took a bit of an investigation into why my claude wasnt working, i paid $5 to try and use the api key instead, and i noticed that it had the same issue of it saying it had issues reaching open ai servers. so it didnt matter whether i used my cursor pro or the api key for my claude. I went and reset my cursor and noticed it worked and then stopped working again. So I thought about what the new tabs were doing and when it failed (it seemed to fail when it was trying to look into the files and index them), I also noticed it failed when i would try send my codebase, with ctrl enter. So i went into my settings and decided to clear out my codebase indexing and resynced the index again. it seems that if you do this you can continue a convo with claude longer without it having errors. it seems after a period of time that the requests break due to some kind of code indexing issue. so if you wipe it every like 10 requests you should be able to keep using the same tab and have it have the context window that claude is known for. i also cleared out my files in my appdata because my issue even before clearing my files is that it didn't ever work. just know doing that will make you lose any settings you did locally do your vscode, shortcuts, themes, etc, but not extensions.
keep in mind for me im not using open router or anything mine is just failing by default with the standard claude 3.5 and all other claude models with cursor if the chat is 5-10+ messages long with sending the code base.
@truell20 i dont really know who else to tag about this but hopefully it helps. I saw a few days ago you guys were investigating it and its still not fixed so maybe that makes it a bit easier to find out what it is
For me, it doesn't work in any way: ALT+Enter, Enter, CTRL+Enter. Resetting the indexing didn't work either.
Still have the issue on latest patch. Different error, it seems to be trying to reach anthropic, even though anthropic is disabled and only openai with custom api for openrouter is enabled. Will not update further as I was forced to switch product.
Same error, using an OpenRouter api key used to work but is broken now. Cursor v0.37.1 Vscode 1.89.1. Windows 10.
Same here, any solutions or hot fixes for now?
unfortunately same issue - seems like Cursor is doing some hard-string matching to route to Anthropic when the name contains Claude
Same here, @psinger is right there is some sort of hard coded routing.
You're using your own API key, and we got the following error from Anthropic: {"type":"error","error":{"type":"authentication_error","message":"invalid x-api-key"}}
I dont even have anthropic turned on and yet
Cursor team, how can we help get this fixed? (OpenRouter dev here)
Cursor team, how can we help get this fixed? (OpenRouter dev here)
I used a proxy(one-api) to change claude model to another name and it works. Maybe OpenRouter could support model name alias.
It works for models which cursor don't provide like: deepseek/deepseek-coder
Still getting this issue, are there any hot fixes?
Cursor team, how can we help get this fixed? (OpenRouter dev here)
I used a proxy(one-api) to change claude model to another name and it works. Maybe OpenRouter could support model name alias.
hi @deadblue22 any guide for doin that?
Cursor team, how can we help get this fixed? (OpenRouter dev here)
I really need it
Cursor team, how can we help get this fixed? (OpenRouter dev here)
please Cursor, please take this user need to higher priority, we really need this feature.
I have a quick fix. Disable all models but one from Openrouter and then validate the API key. You can toggle them on afterwards.
It seems like this trick does not work with Anthropic models as I was getting an error regarding wrong API key in
x-api-keyheader
additional context
❯ cursor --version
0.40.4
63dae81aea2c3fc079420fe72578a8eef26ba870
x64
I have a quick fix. Disable all models but one from Openrouter and then validate the API key. You can toggle them on afterwards.
This didn't fix the issue for me. I'm always able to validate the Openrouter API key and use other models like deepseek-coder.
Anthropic still fails to connect apparently due to reasons above.
@kfwebdev You are absolutely correct. I forgot to update my original post with this info. I ended up using https://crosshatch.app mixture of experts models instead
PS: Does anyone know if cursor is using Anthropic prompt caching or not?
I am also exploring https://www.cursorlens.com
imo the people behind cursor are being extremely lazy to implement this simple little openrouter glitch. when it sends calls to openrouter it doesnt put the model names correctly i noticed ("gpt-4" instead of "openai/gpt-4") and so idk if thats it or what but it is SOOOOO frustrating
I also feel inconvenienced and don't understand the details, but the situation is that they are not accepting feedback for development, so I think it's pointless to write about this. The recent commits also seem to be adjusting the wording of the README, so maybe it's more like an archive?
maybe it's time to switch to open-source Cursor alternative, Void https://voideditor.com
Continue.dev also works fine with OpenRouter and Claude
I am also a bit puzzled that this heavily requested feature is not fixed, although it is trivial to fix.
openrouter + anthropic/claude-3.5-sonnet works again. sorry it was broken!
openrouter + anthropic/claude-3.5-sonnet works again! thank you @tmm1 !!
It still does not work for me today with the same error. Can anyone confirm?
can work with openai/gpt-4o-2024-08-06 ?
It still does not work for me today with the same error. Can anyone confirm?
It worked for me on
using
anthropic/claude-3.5-sonnet as model