{"record":{"id":"21f7276b09b76aad","repo":"assafelovic/gpt-researcher","slug":"embedding-not-found","errorCode":null,"errorMessage":"Embedding not found.","messagePattern":"Embedding not found\\.","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"critical","filePath":"gpt_researcher/memory/embeddings.py","lineNumber":225,"sourceCode":"                from langchain_openai import OpenAIEmbeddings\n\n                _embeddings = OpenAIEmbeddings(\n                    model=model,\n                    openai_api_key=os.getenv(\"MINIMAX_API_KEY\"),\n                    openai_api_base=\"https://api.minimax.io/v1\",\n                    **embedding_kwargs,\n                )\n            case \"nebius\":\n                from langchain_openai import OpenAIEmbeddings\n\n                _embeddings = OpenAIEmbeddings(\n                    model=model,\n                    openai_api_key=os.getenv(\"NEBIUS_API_KEY\"),\n                    openai_api_base=os.getenv(\"NEBIUS_BASE_URL\", \"https://api.tokenfactory.nebius.com/v1\"),\n                    **embedding_kwargs,\n                )\n            case _:\n                raise Exception(\"Embedding not found.\")\n\n        self._embeddings = _embeddings\n\n    def get_embeddings(self):\n        \"\"\"Get the configured embeddings instance.\n\n        Returns:\n            The LangChain embeddings instance configured for this Memory.\n        \"\"\"\n        return self._embeddings\n","sourceCodeStart":207,"sourceCodeEnd":236,"githubUrl":"https://github.com/assafelovic/gpt-researcher/blob/6f998577d547b1e54ec662dac63583aa11e3b84b/gpt_researcher/memory/embeddings.py#L207-L236","documentation":"Generic Exception(\"Embedding not found.\") thrown from the embeddings factory's match statement when the configured embedding provider string matches none of the supported cases (OpenAI variants, Azure, Ollama, VertexAI, Nebius, etc.). It means the memory/embedding layer cannot be constructed for the chosen provider name.","triggerScenarios":"Constructing the embeddings wrapper with an embedding provider value (e.g. from config embedding_provider) that falls into the `case _` branch of the match statement in __init__.","commonSituations":"Typos in the embedding provider config (\"openaai\", \"huggingface\" vs expected casing), new/renamed providers after an upgrade, or custom provider names the factory doesn't recognize.","solutions":["Check your config's embedding provider value against the supported case branches in gpt_researcher/memory/embeddings.py.","Fix typos/casing in the provider name (it must match a supported case exactly).","Set a known-good fallback like \"openai\" (with OPENAI_API_KEY set) to confirm the rest of the pipeline works.","If you need a custom provider, extend the match statement or file an issue for support."],"exampleFix":"// before\nembedding_provider = \"huggingface\"  # not handled -> Exception\n\n// after\nembedding_provider = \"ollama\"  # or \"openai\", matching a supported case","handlingStrategy":"validation","validationCode":"SUPPORTED = {\"openai\", \"azure\", \"ollama\", \"vertexai\", \"nebius\"}  # mirror the match cases\nif cfg.embedding_provider.lower() not in SUPPORTED:\n    raise ValueError(f\"Unsupported embedding provider: {cfg.embedding_provider}\")","typeGuard":"null","tryCatchPattern":"try:\n    emb = Embeddings(cfg)\nexcept Exception as e:\n    if \"Embedding not found\" in str(e):\n        cfg.embedding_provider = \"openai\"\n        emb = Embeddings(cfg)\n    else:\n        raise","preventionTips":["Assert the provider name against supported values at startup.","Pin config values in tests for each provider you use.","Check the match statement in embeddings.py after library upgrades."],"tags":["embeddings","config","provider-not-found","memory"],"backgroundTag":"unsupported-provider-config","analyzedSha":"6f998577d547b1e54ec662dac63583aa11e3b84b","analyzedAt":"2026-08-28T17:50:07.383Z","schemaVersion":2},"datasetVersion":"2026-08-28T21:17:43.275Z"}