{"record":{"id":"89314bbf50353e66","repo":"MemPalace/mempalace","slug":"palace-already-records-embedder-old-model-name-r","errorCode":null,"errorMessage":"palace already records embedder {old.model_name!r}; pass --force to overwrite it with {new.model_name!r} (only if the vectors are compatible)","messagePattern":"palace already records embedder (.+?); pass --force to overwrite it with (.+?) \\(only if the vectors are compatible\\)","errorType":"exception","errorClass":"EmbedderIdentityMismatchError","httpStatus":null,"severity":"error","filePath":"mempalace/palace.py","lineNumber":329,"sourceCode":"        new = get_embedder_identity()\n    else:\n        # Explicit override of a non-configured model: record the name only,\n        # never load a foreign model (which can be a large download) just to\n        # probe a dimension. The model-name check is the actual protection.\n        new = EmbedderIdentity(model_name=target, dimension=0)\n    collection = get_collection(\n        palace_path,\n        collection_name=collection_name,\n        create=True,\n        backend=backend,\n        _skip_identity_check=True,\n    )\n    try:\n        old = collection.get_stored_embedder_identity()\n    except Exception:\n        old = None\n    if old is not None and old.model_name != new.model_name and not force:\n        raise EmbedderIdentityMismatchError(\n            f\"palace already records embedder {old.model_name!r}; pass --force to \"\n            f\"overwrite it with {new.model_name!r} (only if the vectors are compatible)\"\n        )\n    collection.set_embedder_identity(new)\n    # Reset the per-process validation cache so a re-open re-checks against the\n    # newly recorded identity rather than a stale verdict.\n    _VALIDATED_IDENTITY.clear()\n    return old, new\n\n\ndef get_closets_collection(\n    palace_path: str,\n    create: bool = True,\n    backend: Optional[str] = None,\n):\n    \"\"\"Get the closets collection — the searchable index layer.\"\"\"\n    return get_collection(\n        palace_path,","sourceCodeStart":311,"sourceCodeEnd":347,"githubUrl":"https://github.com/MemPalace/mempalace/blob/06cb6987f02610784fefbad4b2bd5d026d164ba6/mempalace/palace.py#L311-L347","documentation":"Error \"palace already records embedder {old.model_name!r}; pass --force to overwrite it with {new.model_name!r} (only if the vectors are compatible)\" thrown in MemPalace/mempalace.","triggerScenarios":"Thrown at mempalace/palace.py:329 when the library encounters an invalid state.","commonSituations":"Attempted to change the recorded embedder identity over an existing record.","solutions":["Pass --force only if you know the vectors are compatible; otherwise re-embed the palace"],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"06cb6987f02610784fefbad4b2bd5d026d164ba6","analyzedAt":"2026-08-15T03:03:36.213Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}