You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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).
export ANTHROPIC_BASE_URL=http://0.0.0.0:4000 && export DISABLE_PROMPT_CACHING=0 && claude
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.
Reacted by Tyler Ashworth, FeepingCreature, David Bezuidenhout and Max Nowack
@tyler-gametime and others - could you share more about why you'd like to use claude code via openrouter?
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.
@tyler-gametime and others - could you share more about why you'd like to use claude code via openrouter?
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.
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.
Reacted by L, Alex Atallah, Roozbeh Sharifnasab, Daniel Becker, Ilja Leiko, Yiming Shen, plpycoin, meowtech and Raymond W. Ko
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.
Activity
tyler-gametime commentedon Feb 24, 2025
Big +1 to this, until this is supported it will block adaption by my company.
ping-Toven commentedon Feb 24, 2025
Would love to see this :)
fn5 commentedon Feb 24, 2025
Please! Keen as a bean.
catherinewu commentedon Feb 25, 2025
@tyler-gametime and others - could you share more about why you'd like to use claude code via openrouter?
RodolfoCastanheira commentedon Feb 25, 2025
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.
mehertz commentedon Feb 26, 2025
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).
mneuhaus commentedon Feb 26, 2025
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.
FeepingCreature commentedon Feb 26, 2025
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.
sFritsch09 commentedon Feb 26, 2025
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.
tyler-gametime commentedon Feb 26, 2025
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.
bcherny commentedon Feb 26, 2025
No plans to enable OpenRouter at this time.
maxnowack commentedon Mar 14, 2025
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.
github-actions commentedon Aug 10, 2025
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.