continue
continue copied to clipboard
Support authentication for ollama used as embeddingsProvider
Validations
- [x] I believe this is a way to improve. I'll try to join the Continue Discord for questions
- [X] I'm not able to find an open issue that requests the same enhancement
Problem
According to the config documentation, unlike when defining models or a tabAutocompleteModel, there is no support for requestOptions.headers on the embeddingsProvider.
For most providers that is not a big issue as they do their authentication via the apiKey. However, when authentication is used with ollama then that has to be done via a custom header in the request options as documented for models. As the result, it seems impossible to use ollama with authentication as embeddings provider at the moment.
Solution
The most consistent solution with the remaining config would probably be to add support for requestOptions.headers also to the embeddingsProvider.
@niosHD In the next release (0.9.119) we will have a global requestOptions object that can be used for this purpose, as well as I just added embeddingsProvider-specific requestOptions: https://github.com/continuedev/continue/commit/7054980ede825a8158ded23e4b566633cc1e0a55
I'll wait to close the issue until this is released!