Validations
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.
Validations
Problem
According to the config documentation, unlike when defining
modelsor atabAutocompleteModel, there is no support forrequestOptions.headerson theembeddingsProvider.For most providers that is not a big issue as they do their authentication via the
apiKey. However, when authentication is used withollamathen 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.headersalso to theembeddingsProvider.