Silence provider model-list fetch connection errors - #682
Open
chrisnestrud wants to merge 1 commit into
Open
chrisnestrud wants to merge 1 commit into
chrisnestrud wants to merge 1 commit into
Conversation
The /model command fetches provider model lists as a best-effort HTTP request and printed an error whenever the endpoint was unreachable, e.g. no local Ollama server at localhost:11434. Suppress connection errors so an absent endpoint contributes no models, while keeping the diagnostic print for real fetch failures.
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.
Problem
Typing
/modelin the TUI triggers a best-effort fetch of provider modellists. When a provider endpoint is unreachable — e.g. no local Ollama server
at
localhost:11434— cecli printed an error to the user:That's noise for an endpoint that legitimately just isn't there.
Change
Suppress
requests.exceptions.ConnectionErrorin_fetch_provider_modelsso an unreachable endpoint silently contributes no models. Real fetch
failures (bad API keys, HTTP errors, malformed responses) still print the
diagnostic message.
Test
python -m py_compile cecli/helpers/model_providers.py