Skip to content

I want to use openrouter #2

Closed
Closed

Description

@Mike-FreeAI
No description provided.

Activity

  1. tyler-gametime commented on Feb 24, 2025

    @tyler-gametime

    Big +1 to this, until this is supported it will block adaption by my company.

  2. ping-Toven commented on Feb 24, 2025

    @ping-Toven

    Would love to see this :)

  3. fn5 commented on Feb 24, 2025

    @fn5

    Please! Keen as a bean.

  4. catherinewu commented on Feb 25, 2025

    @catherinewu
    Contributor

    @tyler-gametime and others - could you share more about why you'd like to use claude code via openrouter?

  5. RodolfoCastanheira commented on Feb 25, 2025

    @RodolfoCastanheira

    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.

  6. mehertz commented on Feb 26, 2025

    @mehertz

    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).

  7. mneuhaus commented on Feb 26, 2025

    @mneuhaus

    so i did a little digging...

    here are all Envs i've found in the claude code:

    • CLAUDE_CODE_USE_BEDROCK
    • CLAUDE_CODE_USE_VERTEX
    • ANTHROPIC_MODEL
    • VERTEX_REGION_CLAUDE_3_5_HAIKU
    • VERTEX_REGION_CLAUDE_3_5_SONNET
    • VERTEX_REGION_CLAUDE_3_7_SONNET
    • CLAUDE_CONFIG_DIR
    • AWS_ACCESS_KEY_ID
    • AWS_SECRET_ACCESS_KEY
    • AWS_SESSION_TOKEN
    • DISABLE_PROMPT_CACHING
    • API_TIMEOUT_MS
    • CLOUD_ML_REGION
    • ANTHROPIC_BASE_URL
    • ANTHROPIC_API_KEY
    • ANTHROPIC_AUTH_TOKEN
    • ANTHROPIC_BEDROCK_BASE_URL
    • AWS_REGION
    • ANTHROPIC_VERTEX_BASE_URL
    • ANTHROPIC_VERTEX_BASE_URL
    • ANTHROPIC_VERTEX_PROJECT_ID

    i managed to get it to connect to LiteLLM with this:

    litellm --model openrouter/openai/o3-mini-high --detailed_debug
    
    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.

  8. FeepingCreature commented on Feb 26, 2025

    @FeepingCreature

    @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.

  9. sFritsch09 commented on Feb 26, 2025

    @sFritsch09

    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.

  10. tyler-gametime commented on Feb 26, 2025

    @tyler-gametime

    @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.

  11. bcherny commented on Feb 26, 2025

    @bcherny
    Collaborator

    No plans to enable OpenRouter at this time.

  12. maxnowack commented on Mar 14, 2025

    @maxnowack

    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.

  13. github-actions commented on Aug 10, 2025

    @github-actions

    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.

  14. locked as resolved and limited conversation to collaborators on Aug 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions