Skip to content

Silence provider model-list fetch connection errors - #682

Merged
dwash96 merged 1 commit into
cecli-dev:v1.6.1from
chrisnestrud:silent-ollama-model-list
Sep 23, 2026
Merged

dwash96 merged 1 commit into
cecli-dev:v1.6.1from
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.
@dwash96
dwash96 changed the base branch from main to v1.6.1 September 23, 2026 04:00
@dwash96
dwash96 merged commit e5fdfb1 into cecli-dev:v1.6.1 Sep 23, 2026
12 checks passed
@dwash96 dwash96 mentioned this pull request Sep 23, 2026
@chrisnestrud
chrisnestrud deleted the silent-ollama-model-list branch September 23, 2026 17:07
JessicaMulein pushed a commit to Digital-Defiance/cecli that referenced this pull request Sep 23, 2026
…l-list

Silence provider model-list fetch connection errors
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.

2 participants