MemPalace/mempalace · error · EmbedderIdentityMismatchError

palace already records embedder {old.model_name!r}; pass --f

Error message

palace already records embedder {old.model_name!r}; pass --force to overwrite it with {new.model_name!r} (only if the vectors are compatible)

What it means

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.

Source

Thrown at mempalace/palace.py:329

        new = get_embedder_identity()
    else:
        # Explicit override of a non-configured model: record the name only,
        # never load a foreign model (which can be a large download) just to
        # probe a dimension. The model-name check is the actual protection.
        new = EmbedderIdentity(model_name=target, dimension=0)
    collection = get_collection(
        palace_path,
        collection_name=collection_name,
        create=True,
        backend=backend,
        _skip_identity_check=True,
    )
    try:
        old = collection.get_stored_embedder_identity()
    except Exception:
        old = None
    if old is not None and old.model_name != new.model_name and not force:
        raise EmbedderIdentityMismatchError(
            f"palace already records embedder {old.model_name!r}; pass --force to "
            f"overwrite it with {new.model_name!r} (only if the vectors are compatible)"
        )
    collection.set_embedder_identity(new)
    # Reset the per-process validation cache so a re-open re-checks against the
    # newly recorded identity rather than a stale verdict.
    _VALIDATED_IDENTITY.clear()
    return old, new


def get_closets_collection(
    palace_path: str,
    create: bool = True,
    backend: Optional[str] = None,
):
    """Get the closets collection — the searchable index layer."""
    return get_collection(
        palace_path,

View on GitHub (pinned to 06cb6987f0)

Solutions

  1. Pass --force only if you know the vectors are compatible; otherwise re-embed the palace

When it happens

Trigger: Thrown at mempalace/palace.py:329 when the library encounters an invalid state.

Common situations: Attempted to change the recorded embedder identity over an existing record.


AI-assisted analysis of MemPalace/mempalace@06cb6987f0 (2026-08-15). Data as JSON: /api/errors/89314bbf50353e66. Report an issue: GitHub.