fleet-memory/hindsight-api/hindsight_api/engine/retain
Nicolò Boschi 66423b85f5
fix: resolve TypeError when LLM returns invalid JSON across all retries (#488) (#490)
- Rename shadowed `max_retries` variable to `llm_max_retries` and move
  config resolution outside the loop; the old code captured `range(2)`
  then overwrote `max_retries` inside the loop, so comparisons used a
  different value than the loop bound — causing `continue` on the final
  iteration, exhausting the loop, and reaching `raise last_error` where
  `last_error` was still None → TypeError
- Add fallback `raise RuntimeError(...)` after the retry loop so that if
  `last_error` is None a descriptive error is raised instead of None
- Add unit tests covering non-dict JSON responses with various retry counts
2026-03-04 14:17:55 +01:00
..
__init__.py fix(performance): improve recall and retain performance on large banks (#469) 2026-03-03 13:35:22 +01:00
bank_utils.py feat: introduce mental models (#132) 2026-01-16 11:16:41 +01:00
chunk_storage.py feat: extensions (#54) 2025-12-22 11:05:23 +01:00
embedding_processing.py feat: entity labels — optional, free_values, multi_value, UI polish (#450) 2026-03-02 13:05:25 +01:00
embedding_utils.py fix(performance): improve recall and retain performance on large banks (#469) 2026-03-03 13:35:22 +01:00
entity_labels.py feat: entity labels — optional, free_values, multi_value, UI polish (#450) 2026-03-02 13:05:25 +01:00
entity_processing.py feat: entity labels — optional, free_values, multi_value, UI polish (#450) 2026-03-02 13:05:25 +01:00
fact_extraction.py fix: resolve TypeError when LLM returns invalid JSON across all retries (#488) (#490) 2026-03-04 14:17:55 +01:00
fact_storage.py feat: entity labels — optional, free_values, multi_value, UI polish (#450) 2026-03-02 13:05:25 +01:00
link_creation.py fix: doc build and lint files (#34) 2025-12-16 13:49:09 +01:00
link_utils.py fix(performance): improve recall and retain performance on large banks (#469) 2026-03-03 13:35:22 +01:00
orchestrator.py feat: webhook system with retain.completed event, UI, and docs (#487) 2026-03-04 14:17:01 +01:00
types.py feat: support timestamp="unset" to retain content without a date (#465) 2026-03-02 12:03:23 +01:00