You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cannot load custom providers from local file paths #4324
OpenCode fails to load custom providers when using local file paths, always attempting to install them from npm registry instead. This prevents important use cases like local development, private/internal providers, and custom integrations.
Current Behavior
When configuring a custom provider with a local path:
OpenCode should detect local file paths and import them directly without attempting npm installation, similar to how other configuration options (like plugins and tools) support local paths.
Expected to work:
Absolute paths: "/path/to/provider"
Relative paths: "./providers/my-provider"
File URLs: "file://./providers/my-provider"
what problems does this cause?
I'm trying to use opencode as a harness for generating information using llm's. We have a custom llm gateway that we use to handle all of the auth around different models. However, I'm unable to use the AI SDK as I cant make my own custom provider.
I've submitted PR #4323 with a proposed fix for this issue.
Activity
rekram1-node commentedon Nov 14, 2025
fixed by U