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: validation failure on blocks retrieve [LET-6709] (#8146)

cthomas6c19192413e0
diff --git a/fern/openapi.json b/fern/openapi.json
index a94299c0a..3f8b1ca97 100644
--- a/fern/openapi.json
+++ b/fern/openapi.json
@@ -10263,17 +10263,22 @@
"type": "string",
"minLength": 1,
"maxLength": 50,
- "pattern": "^[a-zA-Z0-9_-]+$"
+ "pattern": "^[a-zA-Z0-9_/-]+$"
},
{
"type": "null"
}
],
- "description": "Label to include (alphanumeric, hyphens, underscores only)",
- "examples": ["human", "persona", "the_label_of-a-block"],
+ "description": "Label to include (alphanumeric, hyphens, underscores, forward slashes)",
+ "examples": [
+ "human",
+ "persona",
+ "the_label_of-a-block",
+ "the_label_of-a-block/with-forward-slash"
+ ],
"title": "Label"
},
- "description": "Label to include (alphanumeric, hyphens, underscores only)"
+ "description": "Label to include (alphanumeric, hyphens, underscores, forward slashes)"
},
{
"name": "templates_only",
@@ -10461,14 +10466,19 @@
"type": "string",
"minLength": 1,
"maxLength": 50,
- "pattern": "^[a-zA-Z0-9_-]+$"
+ "pattern": "^[a-zA-Z0-9_/-]+$"
},
{
"type": "null"
}
],
"description": "Search blocks by label. If provided, returns blocks whose label matches the search query. This is a full-text search on block labels.",
- "examples": ["human", "persona", "the_label_of-a-block"],
+ "examples": [
+ "human",
+ "persona",
+ "the_label_of-a-block",
+ "the_label_of-a-block/with-forward-slash"
+ ],
"title": "Label Search"
},
"description": "Search blocks by label. If provided, returns blocks whose label matches the search query. This is a full-text search on block labels."
@@ -12177,17 +12187,22 @@
"type": "string",
"minLength": 1,
"maxLength": 50,
- "pattern": "^[a-zA-Z0-9_-]+$"
+ "pattern": "^[a-zA-Z0-9_/-]+$"
},
{
"type": "null"
}
],
- "description": "Label to include (alphanumeric, hyphens, underscores only)",
- "examples": ["human", "persona", "the_label_of-a-block"],
+ "description": "Label to include (alphanumeric, hyphens, underscores, forward slashes)",
+ "examples": [
+ "human",
+ "persona",
+ "the_label_of-a-block",
+ "the_label_of-a-block/with-forward-slash"
+ ],
"title": "Label"
},
- "description": "Label to include (alphanumeric, hyphens, underscores only)"
+ "description": "Label to include (alphanumeric, hyphens, underscores, forward slashes)"
},
{
"name": "templates_only",
@@ -12375,14 +12390,19 @@
"type": "string",
"minLength": 1,
"maxLength": 50,
- "pattern": "^[a-zA-Z0-9_-]+$"
+ "pattern": "^[a-zA-Z0-9_/-]+$"
},
{
"type": "null"
}
],
"description": "Search blocks by label. If provided, returns blocks whose label matches the search query. This is a full-text search on block labels.",
- "examples": ["human", "persona", "the_label_of-a-block"],
+ "examples": [
+ "human",
+ "persona",
+ "the_label_of-a-block",
+ "the_label_of-a-block/with-forward-slash"
+ ],
"title": "Label Search"
},
"description": "Search blocks by label. If provided, returns blocks whose label matches the search query. This is a full-text search on block labels."
diff --git a/letta/validators.py b/letta/validators.py
index 7206664c0..f4e489ea1 100644
--- a/letta/validators.py
+++ b/letta/validators.py
@@ -172,11 +172,11 @@ IdentityIdQuery = Annotated[Optional[str], _create_id_query_validator(PrimitiveT
BlockLabelQuery = Annotated[
Optional[str],
Query(
- description="Label to include (alphanumeric, hyphens, underscores only)",
- pattern=r"^[a-zA-Z0-9_-]+$",
+ description="Label to include (alphanumeric, hyphens, underscores, forward slashes)",
+ pattern=r"^[a-zA-Z0-9_/-]+$",
min_length=1,
max_length=50,
- examples=["human", "persona", "the_label_of-a-block"],
+ examples=["human", "persona", "the_label_of-a-block", "the_label_of-a-block/with-forward-slash"],
),
]
@@ -198,10 +198,10 @@ BlockLabelSearchQuery = Annotated[
Optional[str],
Query(
description="Search blocks by label. If provided, returns blocks whose label matches the search query. This is a full-text search on block labels.",
- pattern=r"^[a-zA-Z0-9_-]+$",
+ pattern=r"^[a-zA-Z0-9_/-]+$",
min_length=1,
max_length=50,
- examples=["human", "persona", "the_label_of-a-block"],
+ examples=["human", "persona", "the_label_of-a-block", "the_label_of-a-block/with-forward-slash"],
),
]