← Back to Support Overview

NETVARA KNOWLEDGE BASE

Configuring Netvara Client with vLLM

Configuring Netvara Client with vLLM

Overview

vLLM provides an OpenAI-compatible API for locally served models. The Netvara Client can connect to that API, discover its models and make them available through the local Netvara gateway.

Prerequisites

  • Netvara Client installed and paired
  • vLLM running locally with an OpenAI-compatible API
  • A vLLM model loaded and ready to accept requests
  • The vLLM API URL, typically http://127.0.0.1:8000
  • An API key if your vLLM deployment requires one

Step-by-Step Instructions

1. Start vLLM and confirm it is listening on its configured host and port. A common local URL is:

   http://127.0.0.1:8000

2. Run the Netvara setup wizard, or edit ~/.netvara-client/backend_config.json.
3. In the configuration, add or update the vllm entry:

   {
     "vllm": {
       "base_url": "http://127.0.0.1:8000",
       "api_key": "YOUR_VLLM_API_KEY"
     }
   }

Omit api_key when the vLLM server does not require authentication. Preserve any other backend entries in the file.

4. Alternatively, configure the connection with environment variables before starting the client:

   export NETVARA_VLLM_URL="http://127.0.0.1:8000"
   export NETVARA_VLLM_API_KEY="YOUR_VLLM_API_KEY"

The API key variable can be omitted when authentication is disabled.

5. Restart the Netvara Client after changing the configuration so it can rediscover the vLLM models.

Model checks when vLLM runs in a container (client 2.8.0+)

When vLLM runs inside a container, the model paths inside the container are not visible on the host by default. Because the Netvara Client runs on the host and cannot read the model files inside the container, the model shows Yellow (unknown) in the Console unless you map the container's model folder to a host folder.

To let the client check the model files vLLM serves:

1. Bind-mount a host folder into the container for the Hugging Face cache (for example, -v /srv/models-cache:/models-cache with HF_HUB_CACHE=/models-cache/huggingface).
2. Add model_path_map under the vllm entry in ~/.netvara-client/backend_config.json to map the container path to the host path:

   {
     "vllm": {
       "base_url": "http://127.0.0.1:8000",
       "model_path_map": {
         "/models-cache": "/path/to/host/models-cache"
       }
     }
   }

3. Start vLLM so the served model is identified either by its repository name (vllm serve <org>/<repo>) or by a path inside the mapped folder. If the client cannot identify the served model files on the host, the model honestly stays Yellow (unknown). There are no manual overrides. Fingerprints are reported by the device and are not independently verified by Netvara; a Green status means only that the device-reported fingerprint matches a published version in the reference catalogue, not that Netvara has reviewed or endorsed the model.

Verification

First check vLLM directly using its own health or models endpoint. Then check the Netvara gateway:

curl -H "Authorization: Bearer $(cat ~/.netvara-client/local_api_key)" \
  http://127.0.0.1:8091/v1/models

The response should include the model IDs served by vLLM. Send a small test request through your OpenAI-compatible client using http://127.0.0.1:8091/v1 as the base URL.

Troubleshooting & Common Questions

Netvara cannot connect to vLLM. Confirm vLLM is running, verify the URL and port and ensure the URL is reachable from the same machine.

The server returns 401 Unauthorized. Add the required key as api_key or set NETVARA_VLLM_API_KEY, then restart the client.

Do I need to tune Ollama-style num_ctx settings? No. vLLM handles request limits through its OpenAI-compatible API. Set an appropriate max_tokens value in the client request and ensure the model's configured context limit can accommodate the prompt and response.

Models are not discovered. Confirm that vLLM's models endpoint returns the expected model ID and that the configured base URL does not include an extra path or typo.

← Back to Support Overview