Skip to content

feat(errors): improve local provider connection error messages#22007

Closed
tobias-weiss-ai-xr wants to merge 1 commit intoanomalyco:devfrom
tobias-weiss-ai-xr:feature/better-provider-errors
Closed

feat(errors): improve local provider connection error messages#22007
tobias-weiss-ai-xr wants to merge 1 commit intoanomalyco:devfrom
tobias-weiss-ai-xr:feature/better-provider-errors

Conversation

@tobias-weiss-ai-xr
Copy link
Copy Markdown

Summary

  • Improve connection error messages for local LLM providers (Ollama, LiteLLM, LM Studio, LocalAI)
  • Add actionable hints when a provider connection fails (e.g., ollama serve, port numbers, default URLs)
  • Help users diagnose common setup issues instead of seeing generic error messages

Test plan

  • Configure an invalid Ollama endpoint — verify the error includes ollama serve hint
  • Configure an invalid LiteLLM endpoint — verify the error includes the correct port hint
  • Configure a valid provider — verify normal operation is unaffected

Detect ECONNREFUSED/ETIMEDOUT/ENOTFOUND errors to localhost URLs and
append provider-specific hints. Ollama, LiteLLM, LM Studio, and LocalAI
all get actionable messages like 'Is Ollama running? Start it with:
ollama serve'.
@github-actions
Copy link
Copy Markdown
Contributor

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@github-actions github-actions bot added the needs:compliance This means the issue will auto-close after 2 hours. label Apr 11, 2026
@github-actions
Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

I found one potentially related PR:

Related PR:

  • feat(opencode): add opencode doctor diagnostic command #21270 - feat(opencode): add 'opencode doctor' diagnostic command
    • This PR adds a diagnostic command that could be related to helping users diagnose provider connection issues. It may address similar concerns about helping users troubleshoot local provider setup problems.

The second result (#14743) about Anthropic prompt cache is not related.

The current PR (#22007) is the primary match in all searches, which is expected.

@github-actions
Copy link
Copy Markdown
Contributor

This pull request has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.

Feel free to open a new pull request that follows our guidelines.

@github-actions github-actions bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Apr 11, 2026
@github-actions github-actions bot closed this Apr 11, 2026
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