This repository was archived by the owner on Jul 4, 2026. It is now read-only.
Fix startup model race conditions, threaded request handling, and encoding cleanup - #37
Open
pratham-jaiswal wants to merge 5 commits into
Conversation
- prevent sending messages before engine/model state is ready - disable send actions while models are still loading - avoid propagating empty model values into requests/conversations - improve frontend model initialization flow - add handling of invalid or unloaded model state - switch server to threaded HTTP handling for safer concurrent streaming - enable daemon request threads for cleaner shutdown behavior
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes intermittent startup/request issues caused by frontend model-state race conditions, improves concurrent streaming stability by enabling threaded HTTP request handling, and cleans up corrupted UTF-8 encoding artifacts found in various code/UI strings.
What changed
Frontend / model-state handling
Server / streaming behavior
ThreadingMixInCleanup
Why
The frontend could become interactive before model initialization had fully settled, especially during slower engine/model loading scenarios. This occasionally allowed empty/invalid model values to propagate into requests.
The threaded HTTP server change improves handling of concurrent streaming requests and avoids situations where request handling/shutdown behavior could become blocked by lingering connections.
The encoding cleanup removes corrupted characters that appeared due to UTF-8/terminal encoding mismatches.
Request for owner verification
Please verify behavior on: