Repository: confident-ai/deepeval
Issue: While using Synthesizer - Irrespective of what Model is Injected - it chose OpenAI for embedding by default.
Root cause: Documentation Deficiency

**Describe the bug**
While using Synthesizer - Irrespective of what Model is Injected - it choses OpenAI for embedding by default.

**To Reproduce****
--------------------------------------------------------------------------------------------------------
from deepeval.dataset import EvaluationDataset, Golden
from deepeval.models import GeminiModel
from deepeval.synthesizer import Synthesizer

import os

# Set the Google API key
GOOGLE_API_KEY = os.environ.get("GOOGLE_API_KEY", "google-key-here")

# Initialize the model
eval_model = GeminiModel(
    model_name="gemini-2.5-flash-lite",
    api_key=GOOGLE_API_KEY,
)

# Use the generate method
response, _ = eval_model.generate("hello")
print(response)

def llm_app(prompt: str) -> str:
    """Simple wrapper around the eval model for DeepEval."""
    response, _ = eval_model.generate(prompt)
    return response

# Pass the same model to the Synthesizer
synthesizer = Synthesizer(model=eval_model)
goldens = synthesizer.generate_goldens_from_docs(
  document_paths=['/Users/3964430/Downloads/hihello.pdf']
)

dataset = EvaluationDataset(goldens=goldens)
print(dataset)

from deepeval.test_case import LLMTestCase
from deepeval.metrics import AnswerRelevancyMetric
from deepeval import evaluate

# Explicitly pass the same model to the metric
answer_relevancy_metric = AnswerRelevancyMetric(model=eval_model)

for golden in dataset.goldens:
  dataset.add_test_case(
    LLMTestCase(
      input=golden.input,
      actual_output=llm_app(golden.input)
    )
  )

evaluate(test_cases=dataset.test_cases, metrics=[answer_relevancy_metric])
--------------------------------------------------------------------------------------------------------

**Error**
openai.AuthenticationError: Error code: 401 - {'error': {'message': 'Your authentication token is not from a valid issuer.', 'type': 'invalid_request_error', 'param': None, 'code': 'invalid_issuer'}}

Since it uses OpenAI for Embedding by default irrespective of what model is passed , its throwing this error.

**Expected behavior**
It has to choose Gemini as a model for embedding.

**Screenshots**

<img width="2690" height="994" alt="Image" src="https://github.com/user-attachments/assets/66a783d3-a297-4c7c-84ef-363e503e8355" />

label : bug, awaiting clarification

Hey @VidhyaGowda,
For embedding models, you need to use a valid embedding model from DeepEval's embedding models or your Custom embedding models and pass it in the `ContextConstructionConfig`:

```python
from deepeval.synthesizer import Synthesizer
from deepeval.synthesizer.config import ContextConstructionConfig
...

synthesizer = Synthesizer()
synthesizer.generate_goldens_from_docs(
    context_construction_config=ContextConstructionConfig(
        embedder=CustomEmbeddingModel() # <-- pass it here
    )
)
```

You can look at the docs here: 
- ContextConstructionConfig: https://deepeval.com/docs/synthesizer-generate-from-docs#customize-context-construction
- Custom embedding model: https://deepeval.com/guides/guides-using-custom-embedding-models#using-a-custom-embedding-model


It seems the docs for this aren't clear enough so we'll update them soon 🙂. If you have any other doubts feel free to ask them here or in discord.

Thanks @A-Vamshi , for redirecting me to revisit the documenatation - i still believe there's a scope to have these models embedded within the codebase - where were choose the embedding model , name it and get it over with instead of implementing these classes ourselves is my point. At the end  of the day, all we want is to have these frameworks easy to use. Does that make sense to you?