Skip to content

fix(retain): retry transient extraction failures - #1851

Closed
xmh1011 wants to merge 1 commit into
vectorize-io:mainfrom
xmh1011:fix/issue-1833-transient-extraction-retry
Closed

xmh1011 wants to merge 1 commit into
vectorize-io:mainfrom
xmh1011:fix/issue-1833-transient-extraction-retry

Conversation

@xmh1011

@xmh1011 xmh1011 commented May 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • preserve the chunk-level exception cause when fact extraction fails
  • classify retryable content extraction failures (rate limit, timeout, connection, 5xx) and re-raise them so worker retry handling can run
  • keep the existing skip-and-empty behavior for deterministic/non-retryable extraction failures

Closes #1833.

Tests

  • uv run ruff check hindsight_api/engine/retain/fact_extraction.py tests/test_fact_extraction_retry.py
  • uv run pytest tests/test_fact_extraction_retry.py tests/test_experience_fact_type_passthrough.py -q
  • ./scripts/hooks/lint.sh

@nicoloboschi nicoloboschi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the transient errors are already handled at llm level
see HINDSIGHT_API_LLM_MAX_RETRIES
https://hindsight.vectorize.io/developer/configuration

if you think we're missing some errors in there that should be retried, please adjust this pr or create a new one, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants