Skip to content

fix(retain): preserve JSON chunks during output retry#2579

Merged
benfrank241 merged 1 commit into
vectorize-io:mainfrom
koriyoshi2041:fix/retain-output-retry-json-split
Jul 7, 2026
Merged

fix(retain): preserve JSON chunks during output retry#2579
benfrank241 merged 1 commit into
vectorize-io:mainfrom
koriyoshi2041:fix/retain-output-retry-json-split

Conversation

@koriyoshi2041

Copy link
Copy Markdown
Contributor

Summary

  • split OutputTooLong retry chunks at conversation JSON-array boundaries before falling back to text splitting
  • split a single oversized conversation turn inside its content field while rewrapping it as a valid JSON array
  • drop unsplittable sub-chunks instead of recursively retrying without progress

Refs #2571.

Tests

  • uv run pytest hindsight-api-slim/tests/test_fact_extraction_retry.py -q
  • uv run ruff check hindsight-api-slim/hindsight_api/engine/retain/fact_extraction.py hindsight-api-slim/tests/test_fact_extraction_retry.py
  • uv run ruff format --check hindsight-api-slim/hindsight_api/engine/retain/fact_extraction.py hindsight-api-slim/tests/test_fact_extraction_retry.py
  • pre-commit hook: check-unused.sh, generate-docs-skill.sh, lint.sh

@benfrank241 benfrank241 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm, thanks!

@benfrank241 benfrank241 merged commit 8f51f99 into vectorize-io:main Jul 7, 2026
87 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants