Repository navigation
fix(providers): retry the local probe after a startup miss - #110
Draft
cursor[bot] wants to merge 1 commit into
Draft
cursor[bot] wants to merge 1 commit into
cursor[bot] wants to merge 1 commit into
Conversation
Init marks llama-server unreachable once. The default chain puts local last, so router recovery never clears that flag and offline chat stays dead until restart. The next chat probes again before refusing. Co-authored-by: esadrianno <esadrianno@gmail.com>
This branch has not been deployed
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Bug and impact
If
llama-serveris not listening when ShellClaw starts,local_initsetss_local_unavailableand that flag stays set for the life of the process on the default chain (anthropic,openai,local). Later chats returnLocal inference server unreachablewithout contacting the server, even after the model has finished loading.That disables the offline path:
fallback_chain = ["local"]never recovers until the process is restarted.Router recovery cannot clear the flag in the default order. It only probes backends that sit before the active index, and
localis last.Root cause
local_chattreated the one-time init probe as permanent.provider_local_recovery_probe_succeeded()only runs from that earlier-index recovery scan, so a startup miss on the last chain entry is never retried.Fix
While the flag is set,
local_chatprobes/v1/modelsor/healthagain. A successful probe clears the flag and the turn is sent. A failed probe still returns the unreachable error and the router can fall through.Validation
test_chat_reprobes_when_server_comes_up. It failed before the fix (chatstayed unreachable after init) and passes after.make test_local_providermake test_router