Skip to content

Comments

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

Open
Fatty911 wants to merge 1 commit intoAider-AI:mainfrom
Fatty911:main
Open

feat: skip auto-commit when LLM response is truncated#4845
Fatty911 wants to merge 1 commit intoAider-AI:mainfrom
Fatty911:main

Conversation

@Fatty911
Copy link

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
@CLAassistant
Copy link

CLAassistant commented Feb 17, 2026

CLA assistant check
All committers have signed the CLA.

opencode.json Outdated
Comment on lines 1 to 23
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"bltcy": {
"npm": "@ai-sdk/openai-compatible",
"name": "BLTCY Proxy 柏拉图次元",
"options": {
"baseURL": "https://api.bltcy.ai/v1",
"apiKey": "{env:ANTHROPIC_API_KEY}"
},
"models": {
"claude-opus-4-6": {
"name": "Claude Opus 4.6"
},
"models": {
"claude-opus-4-6-thinking": {
"name": "Claude Opus 4.6 Thinking"
}
}
}
}
}
}

Choose a reason for hiding this comment

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

Remove

Copy link
Author

Choose a reason for hiding this comment

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

Sorry, I accidentally added my own content to the main branch.I have rolled back the commit.

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.

3 participants