Skip to content

armgit / letta

Public Imported from GitHub
0

Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.

fix(core): remove block limit validation that breaks git memory sync (#9977)

Sarah Wooders140bd9837856
diff --git a/letta/orm/block.py b/letta/orm/block.py
index 7a73ee476..d484cbc03 100644
--- a/letta/orm/block.py
+++ b/letta/orm/block.py
@@ -1,6 +1,6 @@
from typing import TYPE_CHECKING, ClassVar, List, Optional, Type
-from sqlalchemy import JSON, BigInteger, ForeignKey, Index, Integer, String, UniqueConstraint, event
+from sqlalchemy import JSON, BigInteger, ForeignKey, Index, Integer, String, UniqueConstraint
from sqlalchemy.orm import Mapped, declared_attr, mapped_column, relationship
from letta.constants import CORE_MEMORY_BLOCK_CHAR_LIMIT
@@ -113,13 +113,3 @@ class Block(OrganizationMixin, SqlalchemyBase, ProjectMixin, TemplateEntityMixin
lazy="joined", # Typically want current history details readily available
post_update=True,
) # Helps manage potential FK cycles
-
-
[email protected]_for(Block, "before_insert")
[email protected]_for(Block, "before_update")
-def validate_value_length(mapper, connection, target):
- """Ensure the value length does not exceed the limit."""
- if target.value and len(target.value) > target.limit:
- raise ValueError(
- f"Value length ({len(target.value)}) exceeds the limit ({target.limit}) for block with label '{target.label}' and id '{target.id}'."
- )