Shelley/let 7155 favorites tagged should be user scoped [LET-7155] (#9003)

* make favorite tag a const

* add favorite:user:{userId} for favorites

* favorite agent upon initial creation

* rename const

* add eslint ignore

* expect favorite tag
This commit is contained in:
Shelley Pham
2026-01-21 12:40:28 -08:00
committed by Caren Thomas
parent b5e93ab6d1
commit 4353df683e

View File

@@ -300,10 +300,12 @@ def test_agent_tags(client: Letta, clear_tables):
# Test getting all tags
all_tags = client.tags.list()
# Filter out dynamic favorite:user tags since they contain user-specific UUIDs
all_tags_filtered = [tag for tag in all_tags if not tag.startswith("favorite:user:")]
expected_tags = ["agent1", "agent2", "agent3", "development", "origin:letta-chat", "production", "test", "view:letta-chat"]
print("ALL TAGS", all_tags)
print("EXPECTED TAGS", expected_tags)
assert sorted(all_tags) == expected_tags
assert sorted(all_tags_filtered) == expected_tags
# Test pagination
paginated_tags = client.tags.list(limit=2)