-
Notifications
You must be signed in to change notification settings - Fork 3.5k
[Bug]: Plugin fails to load silently when Tavily API key is missing — no user-facing warning #2996
Description
Prerequisites
- I will write this issue in English (see our Language Policy)
- I have searched existing issues to avoid duplicates
- I am using the latest version of oh-my-opencode
- I have read the documentation or asked an AI coding agent with this project's GitHub URL loaded and couldn't find the answer
Bug Description
When configuring websearch with the tavily provider in oh-my-opencode.jsonc and the TAVILY_API_KEY environment variable is not set, the entire plugin fails to load. The config hook error causes the plugin to not register at all, which means all plugin commands (e.g. /start-work) are silently unavailable.
The only indication is a single ERROR line buried in the log file:
ERROR service=plugin error=TAVILY_API_KEY environment variable is required for Tavily provider plugin config hook failed
There is no toast notification, no TUI warning, and no visible feedback to the user. The plugin simply doesn't appear, and users have no way to know why without manually inspecting the log file at ~/.local/share/opencode/log/.
This is a poor failure mode — a missing optional feature (websearch) should not prevent the entire plugin from loading.
Steps to Reproduce
- Configure
oh-my-opencode.jsoncwith Tavily websearch: - Do not set the
TAVILY_API_KEYenvironment variable. - Start OpenCode.
- Try to use any plugin command like
/start-work— the command does not exist. - No error is shown in the TUI. Check the log file to find the error.
Expected Behavior
- A missing API key for an optional feature (websearch) should not prevent the entire plugin from loading.
- The plugin should gracefully degrade: load successfully with websearch disabled, and show a visible warning (toast or status bar) that Tavily websearch is unavailable due to a missing API key.
- At minimum, if the plugin does fail to load, there should be an explicit, user-visible error message — not a silent failure.
Actual Behavior
The config hook failure causes the entire plugin to fail to load silently. All plugin commands (/start-work, etc.) become unavailable with no explanation. The error is only visible in the log file.
Error Logs
ERROR 2026-04-01T07:10:45 +1ms service=plugin error=TAVILY_API_KEY environment variable is required for Tavily provider plugin config hook failed
Operating System
macOS
OpenCode Version
1.3.13
{ "websearch": { "provider": "tavily", "apiKey": "{env:TAVILY_API_KEY}" } }