Unable to change model provider for MDXSearchTool

I was trying to customize the MDXSearchTool to use Cohere models instead of OpenAI. The simple code is as follows:

semantic_search_resume_tool: MDXSearchTool = MDXSearchTool(
        mdx='resume.md',
        config={
            "embedding_model": {
                "provider": "cohere",
                "config": {
                    "model": "embed-english-v3.0",
                },
            },
            "vectordb": {
                "provider": "chromadb",
                "config": {}
            },
        },
    )

But since I already ran the crew with another provider before, now it throws the following error:

An embedding function already exists in the collection configuration, and a new one is provided. If this is intentional, please embed documents separately. Embedding function conflict: new: cohere vs persisted: openai [type=value_error, input_value={‘collection_name’: 'rag_…logservice_port=50052))}, input_type=dict]

So basically, I would like to know how to override/replace the previously created collection with another model?

@Abu_Ubaida You’re hitting a ChromaDB embedding function conflict. Chroma persists a collection with the embedding function metadata it was created with (OpenAI, in your earlier run). When you now pass a different embedding function (Cohere), Chroma refuses to reuse that persisted collection because the vectors aren’t compatible.

You have a few clean ways to switch providers:

  1. Chroma stores an embedding function signature with each collection.
  2. Reusing that collection with a different embedder (OpenAI → Cohere) is blocked to prevent corrupted/mismatched similarity search results.
  3. Therefore, you must drop and recreate, or write to a new collection, or use a separate persist directory.