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

feat: Provider Extension - OpenRouter #3452

Closed
2 of 4 tasks
Tracked by #3374 ...
Editquest opened this issue Aug 25, 2024 · 5 comments
Closed
2 of 4 tasks
Tracked by #3374 ...

feat: Provider Extension - OpenRouter #3452

Editquest opened this issue Aug 25, 2024 · 5 comments
Assignees
Labels
category: providers Local & remote inference providers type: feature request A new feature

Comments

@Editquest
Copy link

Editquest commented Aug 25, 2024

Goal

  • Support OpenRouter as a remote provider
  • Available OR models should show up in Hub

Original User Request

  • I have searched the existing issues

Current behavior

Is there a way to get it show the list of model's available and be able to pick one?

{
"sources": [
{
"url": "https://openrouter.ai"
}
],
"id": "open-router-auto",
"object": "model",
"name": "OpenRouter",
"version": "1.0",
"description": " OpenRouter scouts for the lowest prices and best latencies/throughputs across dozens of providers, and lets you choose how to prioritize them.",
"format": "api",
"settings": {},
"parameters": {
"max_tokens": 1024,
"temperature": 0.7,
"top_p": 0.95,
"frequency_penalty": 0,
"presence_penalty": 0
},
"metadata": {
"author": "OpenRouter",
"tags": [
"General",
"Big Context Length"
]
},
"engine": "openrouter"
}

Minimum reproduction step

its on Auto

Expected behavior

Auto

Screenshots / Logs

{
"sources": [
{
"url": "https://openrouter.ai"
}
],
"id": "open-router-auto",
"object": "model",
"name": "OpenRouter",
"version": "1.0",
"description": " OpenRouter scouts for the lowest prices and best latencies/throughputs across dozens of providers, and lets you choose how to prioritize them.",
"format": "api",
"settings": {},
"parameters": {
"max_tokens": 1024,
"temperature": 0.7,
"top_p": 0.95,
"frequency_penalty": 0,
"presence_penalty": 0
},
"metadata": {
"author": "OpenRouter",
"tags": [
"General",
"Big Context Length"
]
},
"engine": "openrouter"
}

Would switching to work:
import requests
import json

response = requests.post(
url="https://openrouter.ai/api/v1/chat/completions",
headers={
"Authorization": f"Bearer {OPENROUTER_API_KEY}",
"HTTP-Referer": f"{YOUR_SITE_URL}", # Optional, for including your app on openrouter.ai rankings.
"X-Title": f"{YOUR_APP_NAME}", # Optional. Shows in rankings on openrouter.ai.
},
data=json.dumps({
"model": "openai/gpt-3.5-turbo", # Optional
"messages": [
{ "role": "user", "content": "What is the meaning of life?" }
]

})
)

Jan version

Jan v0.5.2

In which operating systems have you tested?

  • macOS
  • Windows
  • Linux

Environment details

N/A

@Editquest Editquest added the type: bug Something isn't working label Aug 25, 2024
@Van-QA
Copy link
Contributor

Van-QA commented Aug 26, 2024

image
image
We introduced a new field to input the model, please check it out via Jan nightly
https://github.com/janhq/jan?tab=readme-ov-file#download
Feel free to get back to us if any issue

@Van-QA Van-QA closed this as completed Aug 26, 2024
@Van-QA Van-QA reopened this Aug 30, 2024
@Van-QA Van-QA changed the title bug: [DESCRIPTION] Openrouter model selection? bug: Openrouter model selection? Aug 30, 2024
@Van-QA
Copy link
Contributor

Van-QA commented Aug 30, 2024

Reopen this to cover the openrouter models selection

@imtuyethan imtuyethan added type: feature request A new feature and removed type: bug Something isn't working labels Aug 30, 2024
@imtuyethan imtuyethan changed the title bug: Openrouter model selection? bug: OpenRouter model selection? Aug 30, 2024
@dan-homebrew dan-homebrew changed the title bug: OpenRouter model selection? feat: OpenRouter model selection? Aug 30, 2024
@bogorad
Copy link

bogorad commented Aug 31, 2024

please allow for multiple, comma-separated model names!

@0xSage
Copy link
Contributor

0xSage commented Oct 13, 2024

related #3505

@0xSage 0xSage added the category: providers Local & remote inference providers label Oct 14, 2024
@0xSage 0xSage changed the title feat: OpenRouter model selection? feat: Provider Extension - OpenRouter Oct 17, 2024
@dan-homebrew
Copy link
Contributor

Closing in favor of #3786

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: providers Local & remote inference providers type: feature request A new feature
Projects
Archived in project
Development

No branches or pull requests

7 participants