-
Notifications
You must be signed in to change notification settings - Fork 2.4k
fix: handle local LLM crashes in Orchestrator mode #8953
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Add retry mechanism for empty model responses (max 3 retries) - Detect and handle connection errors common with local LLMs (Jan.ai, LM Studio) - Provide orchestrator-specific guidance for complex prompts - Add simplification hints after first retry in orchestrator mode - Improve error messages with actionable troubleshooting steps - Add comprehensive test coverage for error scenarios Fixes #8948
✅ Review Complete - No Issues FoundI've completed a thorough review of this PR and found no issues that require changes. What was reviewed:
Highlights:
This PR successfully addresses Issue #8948 and improves the experience for users running local LLMs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No issues found.
|
|
||
| // Simulate empty response on first try, success on second | ||
| let attemptCount = 0 | ||
| const mockRecursiveCall = vi.fn().mockImplementation(async function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused variable mockRecursiveCall is declared but never used. Consider removing it to keep the test clean.
This PR attempts to address Issue #8948.
Problem
Users were experiencing crashes when using local LLM models (KAT-DEV, Qwen3-Coder, Z.AI GLM 4.5V) particularly in Orchestrator mode. The issues included:
Solution
Implemented comprehensive error handling improvements:
1. Retry Mechanism for Empty Responses
2. Connection Error Detection
3. Orchestrator Mode-Specific Handling
4. Improved Error Messages
Testing
EmptyResponseHandling.spec.ts) with 736 lines of testsUser Impact
This fix will significantly improve the experience for users running local LLMs by:
Feedback and guidance are welcome!
Important
This PR improves error handling for local LLM crashes in Orchestrator mode by adding retry mechanisms, enhanced error messages, and comprehensive testing.
Task.ts, with exponential backoff and user feedback.EmptyResponseHandling.spec.tswith tests for empty response retries, connection error handling, and retry counter tracking.This description was created by
for 73449bf. You can customize this summary. It will automatically update as commits are pushed.