{"record":{"id":"a0345c01029608d9","repo":"langchain-ai/langgraph","slug":"invalid-index-parameter-value-for-k-v","errorCode":null,"errorMessage":"Invalid index parameter value for {k}: {v}","messagePattern":"Invalid index parameter value for (.+?): (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"libs/checkpoint-postgres/langgraph/store/postgres/base.py","lineNumber":1270,"sourceCode":"            f\"Invalid index kind for pgvector: {kind}. Expected 'hnsw', 'ivfflat', or 'flat'.\"\n        )\n\n    raw.pop(\"vector_type\", None)\n\n    if kind == \"hnsw\":\n        allowed_keys = {\"m\", \"ef_construction\"}\n    else:  # ivfflat/flat\n        allowed_keys = {\"lists\", \"nlist\"}\n\n    sanitized: dict[str, int] = {}\n    for k, v in list(raw.items()):\n        if k not in allowed_keys:\n            continue\n        key = \"lists\" if k == \"nlist\" else k\n        try:\n            ivalue = int(v)  # type: ignore[call-overload]\n        except Exception as e:\n            raise ValueError(f\"Invalid index parameter value for {k}: {v}\") from e\n        if ivalue <= 0:\n            continue\n        sanitized[key] = ivalue\n\n    return kind, sanitized\n\n\ndef _namespace_to_text(namespace: tuple[str, ...]) -> str:\n    \"\"\"Convert namespace tuple to text string.\"\"\"\n    return \".\".join(namespace)\n\n\ndef _escape_like_literal(text: str) -> str:\n    \"\"\"Escape LIKE metacharacters so `text` is matched literally.\n\n    Namespace labels may contain `_` and `%`, which would otherwise act as\n    wildcards: `(\"user_1\",)` would match `(\"userX1\",)`. Backslash is escaped\n    first so it cannot escape the following character. Requires an explicit","sourceCodeStart":1252,"sourceCodeEnd":1288,"githubUrl":"https://github.com/langchain-ai/langgraph/blob/38031739e551638e373fb553453256c23feeb41f/libs/checkpoint-postgres/langgraph/store/postgres/base.py#L1252-L1288","documentation":"Error \"Invalid index parameter value for {k}: {v}\" thrown in langchain-ai/langgraph.","triggerScenarios":"Thrown at libs/checkpoint-postgres/langgraph/store/postgres/base.py:1270 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"38031739e551638e373fb553453256c23feeb41f","analyzedAt":"2026-08-26T18:02:49.312Z","schemaVersion":2},"datasetVersion":"2026-08-26T21:11:00.512Z"}