I want to use openrouter
Status Fixed / completed
Maintainer reply ✓ Yes — catherinewu
Activity 13 comments · opened Feb 24, 2025 · closed Feb 26, 2025
💡 Likely answer: A maintainer (catherinewu, contributor)
responded on this thread — see the highlighted reply below.
No description provided.
13 Comments
Big +1 to this, until this is supported it will block adaption by my company.
Would love to see this :)
Please! Keen as a bean.
@tyler-gametime and others - could you share more about why you'd like to use claude code via openrouter?
Not exactly this, but for me it would be very useful to be able to change the api address too, so I could appoint it to my litellm instance that logs and normalize my LLM api usage.
Echoing @RodolfoCastanheira's comment - quite surprised that we can't point this at LiteLLM (which is just a Bedrock proxy) so we can get logging, central auth and that sort of stuff. Appreciate it's a research preview though!
Just need to be able to change the base url for bedrock (tbf AWS_ENDPOINT_URL env var might work, haven't tried).
so i did a little digging...
here are all Envs i've found in the claude code:
i managed to get it to connect to LiteLLM with this:
it "kinda" works, at least claude seems to send commands and also gets a response, but i guess thats the mode where claude expects a antropic formatted response, and LiteLLM respons in OpenAI format.
I have an OpenRouter account because it used to be impossible to get Anthropic in Germany, and then you refused my credit card lol.
Even that aside, when you often want to compare between models from multiple providers, OpenRouter just takes a whole ton of hassle off the table. It's a pay-as-you-go one-stop shop for everything on one API.
I would like to use Claude via openrouter because we use it in our company and we'd like to keep just one place of AI models for our team.
We're interested in using OpenRouter primarily because of its higher API availability and the enhanced activity tracking along with robust privacy settings. It's already in use by my company as well, so this would enable a seamless integration.
No plans to enable OpenRouter at this time.
I wrote a small proxy server that converts the Anthropic API format to an OpenAI-compatible format and forwards it to OpenRouter. You can check it out here: https://github.com/maxnowack/anthropic-proxy.
It kind of works, but it seems that commands are not executed by Claude Code.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.