Open WebUI Integration
This guide shows how to integrate vLLM Semantic Router with Open WebUI using the provided pipe.
Architectureâ
Prerequisitesâ
- vLLM Semantic Router deployed and accessible (recommended: Kubernetes deployment via
kubectl apply -k deploy/kubernetes/) - Open WebUI installed and running
Installationâ
Step 1: Install the Pipe in Open WebUIâ
-
Open your Open WebUI instance and go to Admin Panel â Settings â Pipelines
-
Click "+" to add a new pipeline
-
Import the pipe from URL:
https://raw.githubusercontent.com/vllm-project/semantic-router/main/tools/openwebui-pipe/vllm_semantic_router_pipe.py -
Toggle the pipeline to "Enabled" and click "Save"
Step 2: Configure the Pipeâ
Click the gear icon next to the pipeline to configure settings:
| Setting | Description | Example |
|---|---|---|
vsr_base_url | Semantic Router endpoint URL | http://semantic-router.vllm-semantic-router-system.svc.cluster.local:8000 |
show_vsr_info | Display routing decisions in chat | true |
timeout | Request timeout in seconds | 300 |
For Kubernetes deployments, use the service DNS name:
http://semantic-router.vllm-semantic-router-system.svc.cluster.local:8000
Click "Save" to apply the configuration.
Step 3: Use the Modelâ
- Go to the Chat interface
- Select "vllm-semantic-router/auto" from the model dropdown
- Start chatting!
Usageâ
The pipe will display routing information in the chat interface:
đ vLLM Semantic Router Decision đ
đ User Intent Category: general-qa
⥠Chain-of-Thought: off
đĨˇ Hidden Model: qwen2.5-7b-instruct
đ¯ System Prompt Optimized: true
đĨ Semantic Cache: Hit (Fast Response)
To hide this information, set show_vsr_info to false in the pipe configuration.
Troubleshootingâ
Connection Issuesâ
If you see connection errors:
- Verify the Semantic Router is running
- Check the
vsr_base_urlis correct - For Kubernetes, ensure the service DNS name is accessible from Open WebUI pod
Model Not Appearingâ
If the model doesn't appear in the selector:
- Verify the pipe is enabled in Admin Panel â Pipelines
- Refresh the Open WebUI page
- Restart Open WebUI if needed