Skip to content

feat: skip auto-commit when LLM response is truncated#5033

Open
Fatty911 wants to merge 1 commit intoAider-AI:mainfrom
Fatty911:feat/skip-auto-commit-on-truncation-v2
Open

feat: skip auto-commit when LLM response is truncated#5033
Fatty911 wants to merge 1 commit intoAider-AI:mainfrom
Fatty911:feat/skip-auto-commit-on-truncation-v2

Conversation

@Fatty911
Copy link
Copy Markdown

Detect both explicit (FinishReasonLength) and silent truncation (output tokens >= 92% of model limit) and skip auto-commit so users can review potentially incomplete edits before committing.

  • Reset response_was_truncated flag at start of each send_message
  • Set flag on FinishReasonLength for non-prefill models
  • Add silent truncation heuristic (non-prefill models only to avoid false positives from multi-response continuation)
  • Guard auto_commit to skip and warn when truncation detected

Detect both explicit (FinishReasonLength) and silent truncation
(output tokens >= 92% of model limit) and skip auto-commit so
users can review potentially incomplete edits before committing.

- Reset response_was_truncated flag at start of each send_message
- Set flag on FinishReasonLength for non-prefill models
- Add silent truncation heuristic (non-prefill models only to
  avoid false positives from multi-response continuation)
- Guard auto_commit to skip and warn when truncation detected
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.

1 participant