Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Openrouter #19

Open
Rsydab opened this issue Jan 6, 2025 · 5 comments
Open

Add support for Openrouter #19

Rsydab opened this issue Jan 6, 2025 · 5 comments

Comments

@Rsydab
Copy link

Rsydab commented Jan 6, 2025

No description provided.

@rmensing
Copy link

rmensing commented Jan 6, 2025

Openrouter uses an OpenAI compatible API so all you need to do is set the OPENAI_ENDPOINT and OPENAI_API_KEY to those of Openrouter.

OPENAI_ENDPOINT=https://openrouter.ai/api/v1
OPENAI_API_KEY=<your openrouter api key>

In the UI set the LLM provider to openai and to get the proper model name format:

OpenRouter > Models
Select model to get details.
select API tab
Look at the code block example and select the model name there.

@navopw
Copy link

navopw commented Jan 10, 2025

Can confirm it works, I tried out the demo :)

  1. Set endpoint and api key like described by @rmensing

  2. Set model (I used deepseek v3) (deepseek/deepseek-chat)
    CleanShot 2025-01-10 at 22 08 11

Then I checked OpenRouter usage:
CleanShot 2025-01-10 at 22 06 16

Here the demo:
https://github.com/user-attachments/assets/c38f7fa9-b826-4b38-a1f4-be1cf1a18896

@zvictor
Copy link

zvictor commented Jan 19, 2025

How can you select deepseek/deepseek-chat after setting openai as provider? That should not be possible!

Image

@Rsydab
Copy link
Author

Rsydab commented Jan 20, 2025

How can you select deepseek/deepseek-chat after setting openai as provider? That should not be possible!

Image

If you set the openrouter details, like explained in the previous post, then I guess it would be possible. Not if you use openAI settings

@manualsh
Copy link

manualsh commented Feb 13, 2025

The above workaround settings are forgotten and need to be set each time the page is refreshed. Just FYI please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants