Open vkynchev opened 10 months ago
Issue is caused by a Azure.Search.Documents package referenced by SemanticKernel https://github.com/microsoft/semantic-kernel/blob/cb73546bc04d39df2dd8610a6b6fbdc66e7708b4/dotnet/Directory.Packages.props#L11
When there's a different version used in the project it's causing issues on runtime.
@matthewbolanos Not sure if you're the right person to tag, but I resolved it locally by cloning the AzureAISearchMemoryStore class and forcing the API version. Another option would be to update the package in SemanticKernel repo to latest (11.5.1) since the enum option 3 is gone since the stable release of 11.5.0.
Describe the bug There's a runtime validation error regarding SearchClientOptions API version parameter. This param is not passed into the constructor of SearchClientOptions, however somehow it's being set to 3 at runtime (which is not a valid value).
To Reproduce Steps to reproduce the behavior:
AzureAISearchMemoryStore
like so:new AzureAISearchMemoryStore(asConfig.Endpoint, asConfig.APIKey);
Expected behavior SearchClientOptions should be the default value = 2, and the exception should not be thrown.
Screenshots
Platform
Additional context After debugging I've noticed that this constructor gets executed twice with the correct version (2) on DI initialization. However after the first http request to the app it gets called with version=3, thus causing the exception.