ImportError: cannot import name 'ExhaustiveKnnAlgorithmConfiguration' from 'azure.search.documents.indexes.models
Shows how to fix importError: cannot import name 'ExhaustiveKnnAlgorithmConfiguration' from 'azure.search.documents.indexes.models. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
Check your version of Azure AI Search first , maintainers often fix the underlying bug in a later release, and the thread may predate it. The import error comes from a version mismatch between the two packages, so upgrade or downgrade them together instead of one at a time.
Steps
- Pin the pair the reporter confirmed working: langchain==0.1.8 with azure-search-documents==11.4.0. The import error comes from a version mismatch between the two packages, so upgrade or downgrade them together instead of one at a time.
- This comes from one real issue thread (https://github.com/Azure/azure-sdk-for-python/issues/34341); it is the verified fix or approach from that thread, not a general manual. Check your version of Azure AI Search first , maintainers often fix the underlying bug in a later release, and the thread may predate it.
When to use
You are seeing this: Pin the pair the reporter confirmed working: langchain==0.1.8 with azure-search-documents==11.4.0. Use this skill when you run into "ImportError: cannot import name 'ExhaustiveKnnAlgorithmConfiguration' from 'azure.search.documents.indexes.models".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
Versions mentioned in the source: langchain 0.1.8, azure-search-documents 11.4.0. If you are on something much newer or older, the details may have shifted.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Sources
- https://github.com/Azure/azure-sdk-for-python/issues/34341
Maintainer review
No maintainer verification is recorded for this version.
This records the version a maintainer checked. It does not assert that the version is the latest upstream release.