langchain-ai/langgraph · error · ValueError
Embedding configuration is required for vector operations (f
Error message
Embedding configuration is required for vector operations (for semantic search). Please provide an Embeddings when initializing the {store.__class__.__name__}. What it means
Error "Embedding configuration is required for vector operations (for semantic search). Please provide an Embeddings when initializing the {store.__class__.__name__}." thrown in langchain-ai/langgraph.
Source
Thrown at libs/checkpoint-postgres/langgraph/store/postgres/base.py:1426
return tuple(namespace)
if isinstance(namespace, bytes):
namespace = namespace.decode()[1:]
return tuple(namespace.split("."))
def get_distance_operator(store: Any) -> tuple[str, str]:
"""Get the distance operator and score expression based on config."""
# Note: Today, we are not using ANN indices due to restrictions
# on PGVector's support for mixing vector and non-vector filters
# To use the index, PGVector expects:
# - ORDER BY the operator NOT an expression (even negation blocks it)
# - ASCENDING order
# - Any WHERE clause should be over a partial index.
# If we violate any of these, it will use a sequential scan
# See https://github.com/pgvector/pgvector/issues/216 and the
# pgvector documentation for more details.
if not store.index_config:
raise ValueError(
"Embedding configuration is required for vector operations "
f"(for semantic search). "
f"Please provide an Embeddings when initializing the {store.__class__.__name__}."
)
config = cast(PostgresIndexConfig, store.index_config)
distance_type = config.get("distance_type", "cosine")
# Return the operator and the score expression
# The operator is used in the CTE and will be compatible with an ASCENDING ORDER
# sort clause.
# The score expression is used in the final query and will be compatible with
# a DESCENDING ORDER sort clause and the user's expectations of what the similarity score
# should be.
if distance_type == "l2":
# Final: "-(sv.embedding <-> %s::%s)"
# We return the "l2 similarity" so that the sorting order is the same
return "sv.embedding <-> %s::%s", "-scored.neg_score"View on GitHub (pinned to 38031739e5)
When it happens
Trigger: Thrown at libs/checkpoint-postgres/langgraph/store/postgres/base.py:1426 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of langchain-ai/langgraph@38031739e5 (2026-08-26).
Data as JSON: /api/errors/0a7321958af2e198.
Report an issue: GitHub.