[PR #5401] feat(provider): enhance error messages for local providers #11383

Closed
opened 2026-02-16 18:16:12 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/5401

State: closed
Merged: No


When a local provider like LM Studio fails to connect, users get generic error messages that don't help them figure out what's wrong. This improves those error messages to be more actionable.

The changes detect when a provider is local (from the baseURL) and provide specific hints. For LM Studio, it asks if the app is running, suggests checking the port, and links to documentation. For other local providers, it gives generic but helpful guidance.

The error messages now include the baseURL when available, and the formatting detects connection errors (ECONNREFUSED, fetch failed, etc.) to provide relevant troubleshooting steps.

Before this, users would see something like "Failed to initialize provider". Now they see clear hints like "Is LM Studio running?" with specific steps to check.

Related issues: #1555, #2205, #4255, #508, #5344

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/5401 **State:** closed **Merged:** No --- When a local provider like LM Studio fails to connect, users get generic error messages that don't help them figure out what's wrong. This improves those error messages to be more actionable. The changes detect when a provider is local (from the baseURL) and provide specific hints. For LM Studio, it asks if the app is running, suggests checking the port, and links to documentation. For other local providers, it gives generic but helpful guidance. The error messages now include the baseURL when available, and the formatting detects connection errors (ECONNREFUSED, fetch failed, etc.) to provide relevant troubleshooting steps. Before this, users would see something like "Failed to initialize provider". Now they see clear hints like "Is LM Studio running?" with specific steps to check. Related issues: #1555, #2205, #4255, #508, #5344
yindo added the pull-request label 2026-02-16 18:16:12 -05:00
yindo closed this issue 2026-02-16 18:16:12 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#11383