From 3bdadaeca8d16c324ed1dfab71ec5df5a7b55431 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Sun, 5 Apr 2026 22:04:10 -0400 Subject: [PATCH] fix(embeddings): remove stale CONTENT_MAX_CHARS import from rss.py CONTENT_MAX_CHARS was removed from rss.py when the article content cap was lifted. backfill_rss_article_content still referenced it, causing an ImportError on startup. Co-Authored-By: Claude Sonnet 4.6 --- src/fabledassistant/services/embeddings.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/fabledassistant/services/embeddings.py b/src/fabledassistant/services/embeddings.py index fbef48d..8c59101 100644 --- a/src/fabledassistant/services/embeddings.py +++ b/src/fabledassistant/services/embeddings.py @@ -310,7 +310,7 @@ async def backfill_rss_article_content() -> None: typical of feed summaries/teasers rather than full articles. Runs at startup after the embedding backfill. """ - from fabledassistant.services.rss import _fetch_full_article, CONTENT_MAX_CHARS + from fabledassistant.services.rss import _fetch_full_article from fabledassistant.models.rss_feed import RssFeed SHORT_THRESHOLD = 1000 @@ -348,9 +348,9 @@ async def backfill_rss_article_content() -> None: async with async_session() as session: item = await session.get(RssItem, item_id) if item: - item.content = full_text[:CONTENT_MAX_CHARS] + item.content = full_text await session.commit() - await upsert_rss_item_embedding(item_id, user_id, title or "", full_text[:CONTENT_MAX_CHARS]) + await upsert_rss_item_embedding(item_id, user_id, title or "", full_text) enriched += 1 except Exception: logger.debug("Failed to store enriched content for item %d", item_id, exc_info=True)