Skip to content

Silence provider model-list fetch connection errors - #682

Open
chrisnestrud wants to merge 1 commit into
cecli-dev:mainfrom
chrisnestrud:silent-ollama-model-list
Open

chrisnestrud wants to merge 1 commit into
cecli-dev:mainfrom
chrisnestrud:silent-ollama-model-list

Conversation

@chrisnestrud

Copy link
Copy Markdown

Problem

Typing /model in the TUI triggers a best-effort fetch of provider model
lists. When a provider endpoint is unreachable — e.g. no local Ollama server
at localhost:11434 — cecli printed an error to the user:

Failed to fetch ollama model list: ...

That's noise for an endpoint that legitimately just isn't there.

Change

Suppress requests.exceptions.ConnectionError in _fetch_provider_models
so 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

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

No deployments
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.

1 participant