fix(retain): preserve initial call with zero retry budget#2741
fix(retain): preserve initial call with zero retry budget#2741koriyoshi2041 wants to merge 1 commit into
Conversation
ebarkhordar
left a comment
There was a problem hiding this comment.
The retry change itself is two files and lines up with what #2731 asks for. One note on the branch, not on the code.
This branch is stacked on your #2669 but targets main. The head's only parent is #2669's head, which is not on main yet:
$ gh api repos/vectorize-io/hindsight/commits/435874aa3 --jq ".parents[].sha"
ab9a9546db395b780a4997688336578000004fb7 # head of #2669, unmerged
$ gh api repos/vectorize-io/hindsight/compare/main...ab9a9546d --jq ".status"
diverged
That is where the "strict_schema": True hunk in consolidation/consolidator.py and its test come from. They are #2669's change, and a zero retry budget has nothing to do with them. So merging this into main as it stands would also land #2669, reviewed as a side effect of a retry fix rather than on its own.
Retargeting this PR's base to rios/consolidation-strict-schema would show only the retry commit here and keep the two landing in order. Rebasing onto main after #2669 merges does the same. Either way #2669 keeps its own review.
Flagging it because the two PRs are easy to merge out of order, not because anything in the retry fix looks wrong to me.
For transparency: I used an AI agent to check this. The two SHAs above are from the API calls shown, and I have not run the test suite here.
435874a to
c1cf235
Compare
|
Good catch. I rebased this branch directly onto current New head: Revalidated:
|
nicoloboschi
left a comment
There was a problem hiding this comment.
uhm this fix is wrong. with llm_max_retries=1, we should do 1 retry still. so I think we should just do llm_max_retries+1 attempts - please also check the impl in llm_config.call follow the same pattern
|
closing for #2779 which is slightly better |
Summary
retain_llm_max_retries=0Closes #2731.
Validation
uv run --package hindsight-api-slim pytest hindsight-api-slim/tests/test_fact_extraction_retry.py -q(13 passed)uv run --package hindsight-api-slim ruff check hindsight-api-slim/hindsight_api/engine/retain/fact_extraction.py hindsight-api-slim/tests/test_fact_extraction_retry.pyuv run --package hindsight-api-slim ruff format --check hindsight-api-slim/hindsight_api/engine/retain/fact_extraction.py hindsight-api-slim/tests/test_fact_extraction_retry.pygit diff --check