-
-
Notifications
You must be signed in to change notification settings - Fork 362
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 OpenRouter embedding provider #1240
Comments
Thanks @dlqqq , sorry to cross threads! Still wrapping my head around openrouter vs openai protocol. From an end-user perspective it would be great to have drop-in support for custom models like we see in most LLM-wrapping interfaces. (also the design of jupyter-ai configuration seems to assume the same API key is shared across all models? (contrast to the configuration in continue extension where each model interface gets a name, model name, base url, and api key and then we can easily toggle between them). |
@cboettig For trialing out purposes, which embedding models are you using with vLLM? |
@srdas thanks! I'm mostly using mistral-embed. Reading these docs on the code-server side, I realize that embedding models are a lot lighter and run pretty decently even on CPU instances. Note that they have an option to just use transformers.js to do locally without calling out to an API. I think that would be really interesting to explore too... |
@cboettig Thank you, that is helpful. I assume you are using mistral-embed (i) through vLLM (ii) on a remote server and not locally? Note that Jupyter AI already supports mistral-embed: |
@srdas yes it does, but once again recall that I am using vLLM and LiteLLM to access the copy of Mistral we host via vllm. so that interface does not help me. |
@cboettig Thanks for the valuable user feedback! I agree with your points. Jupyter AI needs better support for allowing users to save custom models w/ custom configuration. The user experience for that today is less than intuitive.
We don't allow multiple copies of each key name. So for example, if two models require |
@cboettig Just saw your comment in the previous thread, let me reply also.
This is a valid critique. We have poor support for custom models for a fairly simple reason: we didn't account for this use-case. Jupyter AI started way back >2 years ago, when there were far fewer models & model providers, and when custom models were very rare in the ecosystem. At that time, it made sense to hard-code a list of models for each provider to eliminate the need for users to look up the list of available model IDs. However, times have changed, and Jupyter AI should change too. Users need a way to tell Jupyter AI to "save the provider, model ID, base URL, API key, and all other params for future use". We will likely keep our lists of model IDs, but we should also allow users to override them in case our copy lags behind what's available. The UI and API used in the Jupyter AI settings would have to be reworked for this. This will be a significant effort with multiple cycles of UX & code review. Rest assured that this is on our roadmap. |
Awesome, thanks so much! Yup, Jupyter-AI was totally ahead of the curve, and I know there are challenges in maintaining backwards compatibility and all to existing users. But yes, I think support for custom / open models is particularly important in this community. Appreciate this dialog and all you do to support open source. No worries, I know this all takes time to adjust and we roll with it! |
Problem
Users need an OpenRouter embedding provider to use embedding models from services which implement the OpenAI API specification. These services include OpenRouter, but also include vLLM for invoking embedding models hosted locally.
Proposed Solution
Implement an OpenRouter embedding provider that supports a custom model ID & base URL.
Additional context
Follow-up to #1010.
The text was updated successfully, but these errors were encountered: