When setting up a local LLM environment, accessing services on the Windows host from WSL usually requires manual network and port configuration. The dsh-wsl-hostsvc plugin solves this problem. It probes for OpenAI-compatible LLM servers running on the Windows host from WSL and directly provides an accessible baseURL and configuration snippets.

Core Features

The plugin uses the host_reach tool (default profile=all) to probe local services. Supported configuration profiles include:

  • ollama: Probes Ollama’s default port (11434)
  • lmstudio: Probes the LM Studio local server (usually 1234)
  • vllm: Probes the vLLM OpenAI server (usually 8000)
  • llama: Probes llama-server / Unsloth Desktop (usually 8080)

During probing, it attempts to connect to 127.0.0.1, localhost, host.docker.internal, and the Windows IP obtained from /etc/resolv.conf.

The plugin outputs the following:

  • suggestedBaseURL / the URL for each service
  • providerSnippets.yaml: Can be pasted directly under llm-pi-ai.providers in ~/.dsh/settings.yaml
  • ollamaModels: Exact model IDs obtained from ollama list
  • connectivityPlaybook: Tools to try sequentially when HTTPS/DNS also fail
  • hints: Includes suggestions for matching Ollama’s n_ctx with the configured contextWindow, VRAM hints, and other guidance

Installation and Activation

Install via kit:

curl -fsSL https://raw.githubusercontent.com/173787247/dsh-wsl-kit/master/install.sh | KIT_SET=llm bash

Or install it independently:

dsh plugin --profile web add github:173787247/dsh-wsl-hostsvc

After installation, restart dsh web and open a new session.

Typical Usage

Ask the agent in a conversation to run host_reach with a specified profile:

  • profile: ollama
  • profile: lmstudio
  • profile: vllm
  • profile: llama
  • profile: all

If the service cannot be detected, check whether the Windows-side service is bound outside the loopback interface (for example, OLLAMA_HOST=0.0.0.0:11434), or enable WSL mirrored networking mode and probe again.

Notes

  • Version Dependency: Requires dsh >= 0.1.2 (plugin version 0.4.3).
  • Probing Scope: Only probes local OpenAI-compatible servers on the Windows host (host_reach). It does not configure cloud-based DeepSeek; for V4.1 Flash, use the model ID deepseek-flash in settings.
  • API Readiness: A TCP port being open is not equal to the API being ready.
  • Ollama Context Issue: If num_ctx does not match the contextWindow in settings, you may encounter 400 errors. It is recommended to set Ollama’s num_ctx (for example, 32768) and match that value in settings.
  • Unsloth Distinction: Note the difference between Unsloth Desktop (installed via winget) and Unsloth Studio (directory ~/.unsloth/studio). Desktop usually exposes OpenAI /v1 on port 8080.