- Solution Blueprints
- LLM Router
- Deploy
LLM Router
Prompt router that classifies requests and sends them to the best LLM endpoint using configurable routing rules.
Deployment guide
Getting Started
This is a quick start guide on how to deploy the blueprint. For advanced options, such as connecting to existing LLM endpoints, configuring routing rules, enabling HTTPRoute access, or running the embedding service on CPU instead of GPU, see Deploying Solution Blueprints with Helm or explore the advanced deployment guide.
Prerequisites
System Requirements
This blueprint can be deployed on AMD Instinct (default) and AMD Radeon. The blueprint requires the following cluster resources by default, depending on the hardware being used:
| Resource | Instinct | Radeon |
|---|---|---|
| GPUs | 1 | 1 |
| CPUs | 4 CPU cores | 4 CPU cores |
| RAM | 192 Gi | 32 Gi |
For demo deployment with self-hosted LLMs (deployDemonstrationLLMs=true), plan for 3 GPUs total (2 demonstration LLMs + 1 embedding service). You can run the embedding service on CPUs instead to reduce the number of GPUs used; see Running the Embedding Service on CPU. If you use external LLM endpoints via models configuration, GPU requirements for those services are defined by their own deployments.
To deploy to the Kubernetes cluster, ensure the following prerequisites are met:
- kubectl: Installed and configured to communicate with the cluster
- Helm 3.16 – 4.2.0: Installed on your local machine
Deployment
Solution Blueprints are packaged as OCI-compliant Helm charts in the Docker Hub registry and can be deployed to a Kubernetes cluster with a single command. Define the name (deployment name) and the namespace (Kubernetes namespace), then pipe the output of helm template to kubectl apply -f -.
Find the deployment command below. The examples set deployDemonstrationLLMs=true to deploy with self-hosted AIM backends.
Note: You can create a namespace using kubectl create namespace <my-namespace>.
name="my-deployment"namespace="my-namespace"helm template $name oci://registry-1.docker.io/amdenterpriseai/aimsb-llm-router \ --set deployDemonstrationLLMs=true \ | kubectl apply -f - -n $namespaceThe primary Radeon AIM (Llama 3.1 8B Instruct) is a gated model, so provide a Hugging Face token through a Kubernetes secret.
name="my-deployment"namespace="my-namespace"kubectl create secret generic hf-token \ --from-literal=hf-token="<YOUR_HF_TOKEN_HERE>" \ -n $namespace
helm template $name oci://registry-1.docker.io/amdenterpriseai/aimsb-llm-router \ --set deployDemonstrationLLMs=true \ --set global.platform=radeon \ --set primary.env_vars.HF_TOKEN.name=hf-token \ --set primary.env_vars.HF_TOKEN.key=hf-token \ | kubectl apply -f - -n $namespaceVerify Deployment
To check the status of the deployment, run:
kubectl get pods -n $namespaceWait until all pods report Running and Ready.
Connect to UI
To connect to the UI, port-forward to 8080. The UI will then be available at http://localhost:8080 in your browser.
kubectl port-forward services/${name}-aimsb-llm-router-ui 8080:8008 -n $namespaceUsing the Router
The LLM Router exposes an OpenAI-compatible API and can be used as a drop-in replacement for existing OpenAI-based applications. Requests keep the standard OpenAI structure, while the router transparently handles model selection based on configured routing logic.
The only required extension is the inclusion of llm-router metadata in the request body. This
metadata controls how the request is classified and routed:
- policy: Defines which classification policy should be applied (by default,
task_routerorcomplexity_router). - routing_strategy: Specifies how routing decisions are made.
autodelegates classification to the router-classifier service.manualskips classification and allows the client to explicitly control routing behavior.
Request format
POST /v1/chat/completionsContent-Type: application/jsonAccept: application/json{ "model": "string | empty", "messages": [ { "role": "user | system | assistant", "content": "string" } ], "max_tokens": integer, "stream": boolean, "llm-router": { "policy": "string", "routing_strategy": "auto | manual", "model": "string | empty" }}Clean Up
When you are finished, remove the deployed resources using the same deployment command, with kubectl delete instead of kubectl apply. For example, for Instinct use the following command:
helm template $name oci://registry-1.docker.io/amdenterpriseai/aimsb-llm-router \ --set deployDemonstrationLLMs=true \ | kubectl delete -f - -n $namespaceThird-Party Components
This Solution Blueprint uses multiple third-party components. To see the full set of software and Python dependencies, explore the repository source and dependency files. The table below highlights some of the key components. For further license information, refer to each component’s official documentation.
| Component | License |
|---|---|
| FastAPI | MIT |
| Gradio | Apache 2.0 |
| vLLM | Apache 2.0 |
Terms of Use
AMD Solution Blueprints are released under the MIT License, which governs the parts of the software and materials created by AMD. Third-party Software and Materials used within the Solution Blueprints are governed by their respective licenses.
Refer to the documentation for additional information and advanced deployment options.
View advanced deployment guide