assafelovic/gpt-researcher · error · Exception
Embedding provider not found.
Error message
Embedding provider not found.
What it means
Raised during Config initialization when the EMBEDDING_PROVIDER (or its parsed value) does not match any known provider in the deprecation-compat mapping (openai, azure, cohere, huggingface, ollama, gigachat, google_genai, etc.). The mapping assigns a default embedding_model per provider; unknown names fall into the else branch and raise a bare Exception.
Source
Thrown at gpt_researcher/config/config.py:127
)
embedding_provider = os.environ["EMBEDDING_PROVIDER"]
if embedding_provider == "ollama":
self.embedding_model = os.environ["OLLAMA_EMBEDDING_MODEL"]
elif embedding_provider == "custom":
self.embedding_model = os.getenv("OPENAI_EMBEDDING_MODEL", "custom")
elif embedding_provider == "openai":
self.embedding_model = "text-embedding-3-large"
elif embedding_provider == "azure_openai":
self.embedding_model = "text-embedding-3-large"
elif embedding_provider == "huggingface":
self.embedding_model = "sentence-transformers/all-MiniLM-L6-v2"
elif embedding_provider == "gigachat":
self.embedding_model = "Embeddings"
elif embedding_provider == "google_genai":
self.embedding_model = "text-embedding-004"
else:
raise Exception("Embedding provider not found.")
_deprecation_warning = (
"LLM_PROVIDER, FAST_LLM_MODEL and SMART_LLM_MODEL are deprecated and "
"will be removed soon. Use FAST_LLM and SMART_LLM instead."
)
if os.getenv("LLM_PROVIDER") is not None:
warnings.warn(_deprecation_warning, FutureWarning, stacklevel=2)
self.fast_llm_provider = (
os.environ["LLM_PROVIDER"] or self.fast_llm_provider
)
self.smart_llm_provider = (
os.environ["LLM_PROVIDER"] or self.smart_llm_provider
)
if os.getenv("FAST_LLM_MODEL") is not None:
warnings.warn(_deprecation_warning, FutureWarning, stacklevel=2)
self.fast_llm_model = os.environ["FAST_LLM_MODEL"] or self.fast_llm_model
if os.getenv("SMART_LLM_MODEL") is not None:
warnings.warn(_deprecation_warning, FutureWarning, stacklevel=2)View on GitHub (pinned to 6f998577d5)
Solutions
- Fix the provider name to an exact supported value (e.g. 'openai', 'google_genai')
- Prefer the newer EMBEDDING='provider:model' syntax and unset deprecated EMBEDDING_PROVIDER/EMBEDDING_MODEL vars
- Upgrade gpt-researcher if you expect a newly added provider
Example fix
# before EMBEDDING_PROVIDER=googl_genai # after EMBEDDING=google_genai:text-embedding-004
Defensive patterns
Strategy: validation
Validate before calling
SUPPORTED = {"openai","azure","cohere","huggingface","ollama","gigachat","google_genai"}
assert os.getenv("EMBEDDING_PROVIDER", "openai") in SUPPORTED Try / catch
try:
cfg = Config()
except Exception as e:
if "Embedding provider" in str(e):
raise SystemExit(f"Fix EMBEDDING_PROVIDER: {e}")
raise Prevention
- Use EMBEDDING='provider:model' syntax
- Keep a startup config lint that checks provider names against supported lists
When it happens
Trigger: Setting embedding_provider to a misspelled or unsupported value, e.g. 'googl_genai', 'open_ai', or a new provider not in the if/elif chain, then constructing GPTResearcher or Config.
Common situations: Typos in .env EMBEDDING_PROVIDER; migrating from docs that list a provider name this version doesn't support; using the newer 'EMBEDDING=provider:model' syntax while a stale EMBEDDING_PROVIDER env var still resolves to something odd.
Understand the failure class
Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.
Related errors
- Set EMBEDDING = '<embedding_provider>:<embedding_model>' Eg
- Set SMART_LLM or FAST_LLM = '<llm_provider>:<llm_model>' Eg
- Invalid retriever(s) found: {', '.join(invalid_retrievers)}.
- Invalid reasoning effort: {reasoning_effort_str}. Valid opti
- Cannot convert {env_value} to any of {args}
AI-assisted analysis of assafelovic/gpt-researcher@6f998577d5 (2026-08-28).
Data as JSON: /api/errors/a3a95d7b48442f2e.
Report an issue: GitHub.