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
Built-in vLLM discovery causes recurring 401 requests to oMLX on port 8000 #54347
oMLX is configured as a separate custom OpenAI-compatible provider with a valid API key. Chat completions work. I do not use vLLM.
Reproduction:
Run oMLX with API-key authentication on port 8000.
Configure the omlx provider with its API key and baseURL.
Start the OpenCode background service.
Observe recurring 401 messages in the oMLX logs.
Stopping the OpenCode service stops these requests. Adding an explicit Authorization header to the omlx provider does not resolve them.
Confirmed workaround:
Add "plugins": ["-opencode.provider.vllm"] at the configuration root, then restart the service. No new 401 messages appeared during approximately two minutes with the service running.
packages/core/src/plugin/provider/vllm.ts:14–26 defaults to port 8000 and requests /health and /v1/models.
packages/core/src/plugin/provider/local.ts:34 sets a 30-second interval.
local.ts:113–116 ignores discovery errors and continues polling.
local.ts:142–193 uses the discovery provider API key.
configured.ts:15–19 selects settings by provider ID, so omlx credentials do not authenticate the separate vllm probe.
Expected behavior: Avoid indefinitely polling an authenticated non-vLLM server merely because it occupies port 8000. Consider opt-in discovery, endpoint collision detection, or backoff after authentication failures.
Thanks for the detailed report and source analysis! I think this is a duplicate of #45172, which reports the same thing: OpenCode polls whatever is listening on localhost:8000 every 30 seconds and keeps going even when every request fails. A comment there traces it to the built-in vLLM discovery plugin and gives the same workaround you found ("plugins": ["-opencode.provider.vllm"]). The only difference is the status code. Your oMLX server answers /health successfully, so the probe goes on to /v1/models and gets a 401 there, while in #45172 it stopped at a 404 on /health.
Possible duplicates and related issues, ordered by likelihood:
The bot will close this issue as a duplicate in 1 day unless you reply explaining how your problem is different. Your suggestions (opt-in discovery, backoff after auth failures, collision detection) would be useful additions on #45172.
We haven't heard back, so I'm closing this as a duplicate of #45172. Both are caused by the built-in vLLM discovery plugin polling localhost:8000 every 30 seconds without backing off. Please follow #45172 for updates. Your suggestions (opt-in discovery, backoff after auth failures, endpoint collision detection) would be useful additions there. Until then, the workaround you found still applies: add "plugins": ["-opencode.provider.vllm"] to your config. If your problem turns out to be different, reply here and we can reopen. Thanks for the detailed report!
Activity
opencode-agent commentedon Oct 10, 2026
Thanks for the detailed report and source analysis! I think this is a duplicate of #45172, which reports the same thing: OpenCode polls whatever is listening on
localhost:8000every 30 seconds and keeps going even when every request fails. A comment there traces it to the built-in vLLM discovery plugin and gives the same workaround you found ("plugins": ["-opencode.provider.vllm"]). The only difference is the status code. Your oMLX server answers/healthsuccessfully, so the probe goes on to/v1/modelsand gets a 401 there, while in #45172 it stopped at a 404 on/health.Possible duplicates and related issues, ordered by likelihood:
localhost:8000every 30s with no backoff after errors; same workaround127.0.0.1:8000The bot will close this issue as a duplicate in 1 day unless you reply explaining how your problem is different. Your suggestions (opt-in discovery, backoff after auth failures, collision detection) would be useful additions on #45172.
opencode-agent commentedon Oct 11, 2026
We haven't heard back, so I'm closing this as a duplicate of #45172. Both are caused by the built-in vLLM discovery plugin polling
localhost:8000every 30 seconds without backing off. Please follow #45172 for updates. Your suggestions (opt-in discovery, backoff after auth failures, endpoint collision detection) would be useful additions there. Until then, the workaround you found still applies: add"plugins": ["-opencode.provider.vllm"]to your config. If your problem turns out to be different, reply here and we can reopen. Thanks for the detailed report!