API Reference
Packages
vllm.ai/v1alpha1
Package v1alpha1 contains API Schema definitions for the vllm v1alpha1 API group
Resource Types
APIConfig
APIConfig defines API configuration
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
batch_classification BatchClassificationConfig | Optional: {} |
AutoscalingSpec
AutoscalingSpec defines autoscaling configuration
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
enabled boolean | Enabled indicates if HPA is enabled | false | Optional: {} |
minReplicas integer | MinReplicas is the minimum number of replicas | 1 | Optional: {} |
maxReplicas integer | MaxReplicas is the maximum number of replicas | 10 | Optional: {} |
targetCPUUtilizationPercentage integer | TargetCPUUtilizationPercentage is the target CPU percentage | 80 | Optional: {} |
targetMemoryUtilizationPercentage integer | TargetMemoryUtilizationPercentage is the target memory percentage | Optional: {} |
BatchClassificationConfig
BatchClassificationConfig defines batch classification configuration
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
max_batch_size integer | 100 | Optional: {} | |
concurrency_threshold integer | 5 | Optional: {} | |
max_concurrency integer | 8 | Optional: {} | |
metrics BatchMetricsConfig | Optional: {} |
BatchMetricsConfig
BatchMetricsConfig defines batch classification metrics configuration
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
enabled boolean | true | Optional: {} | |
detailed_goroutine_tracking boolean | true | Optional: {} | |
high_resolution_timing boolean | false | Optional: {} | |
sample_rate string | Sample rate for metrics (0.0-1.0). Stored as string to avoid float precision issues. | 1.0 | Pattern: ^0(\.[0-9]+)?$|^1(\.0+)?$ Optional: {} |
duration_buckets string array | Duration buckets for histograms. Stored as strings to avoid float precision issues. Example: ["0.001", "0.005", "0.01", "0.025", "0.05", "0.1", "0.25", "0.5", "1", "2.5", "5", "10", "30"] | Optional: {} | |
size_buckets integer array | Optional: {} |
CategoryModelConfig
CategoryModelConfig defines category model configuration
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
model_id string | Optional: {} | ||
use_modernbert boolean | Optional: {} | ||
threshold string | Classification threshold (0.0-1.0). Stored as string to avoid float precision issues. | Pattern: ^0(\.[0-9]+)?$|^1(\.0+)?$ Optional: {} | |
use_cpu boolean | Optional: {} | ||
category_mapping_path string | Optional: {} |
ClassifierConfig
ClassifierConfig defines classifier configuration
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
category_model CategoryModelConfig | Optional: {} | ||
pii_model PIIModelConfig | Optional: {} |
ComplexityCandidates
ComplexityCandidates defines candidate examples for complexity classification
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
candidates string array | List of candidate phrases or examples |
ComplexityRulesConfig
ComplexityRulesConfig defines complexity-based signal classification
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
name string | Name of the complexity rule (e.g., "code-complexity", "reasoning-complexity") | ||
description string | Description of what this rule classifies | Optional: {} | |
threshold string | Threshold for difficulty classification (0.0-1.0). Stored as string to avoid float precision issues. Queries scoring above this threshold are classified as "hard" | Pattern: ^0(\.[0-9]+)?$|^1(\.0+)?$ Optional: {} | |
hard ComplexityCandidates | Hard candidates represent complex/difficult examples | ||
easy ComplexityCandidates | Easy candidates represent simple/easy examples | ||
composer RuleComposition | Composer allows filtering based on other signals (e.g., only apply this rule if domain:medical) | Optional: {} |
CompositionCondition
CompositionCondition defines a single composition condition
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
type string | Type of signal to check (e.g., "domain", "language", "category") | ||
name string | Name of the specific signal/rule value to match |
ConfigSpec
ConfigSpec defines the semantic router configuration
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
routing JSON | Routing contains canonical v0.3 routing configuration under config.routing. It is intentionally preserved as an object so the operator can pass through the router-owned signal, projection, decision, and algorithm contract without lagging behind every router schema addition. | Type: object Optional: {} | |
embedding_models EmbeddingModelsConfig | Embedding models configuration (qwen3, gemma, mmbert) | Optional: {} | |
response_cache SemanticCacheConfig | Response cache configuration. | Optional: {} | |
semantic_cache SemanticCacheConfig | SemanticCache is the deprecated response-cache field. | Optional: {} | |
tools ToolsConfig | Tools configuration | Optional: {} | |
prompt_guard PromptGuardConfig | Prompt guard configuration | Optional: {} | |
classifier ClassifierConfig | Classifier configuration | Optional: {} | |
complexity_rules ComplexityRulesConfig array | Complexity rules for complexity-aware routing | Optional: {} | |
strategy string | Decision routing strategy ("priority" for priority-based matching) | Enum: [priority] Optional: {} | |
decisions DecisionConfig array | Routing decisions based on signals (domain, complexity, etc.) | Optional: {} | |
reasoning_families object (keys:string, values:ReasoningFamily) | Reasoning families | Optional: {} | |
default_reasoning_effort string | Default reasoning effort | Enum: [low medium high] Optional: {} | |
api APIConfig | API configuration | Optional: {} | |
observability ObservabilityConfig | Observability configuration | Optional: {} |
DecisionConfig
DecisionConfig defines a routing decision
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
name string | Name is the unique identifier for this decision | ||
description string | Description provides information about what this decision handles | Optional: {} | |
priority integer | Priority is used for decision ordering - higher priority decisions are evaluated first | Optional: {} | |
rules RuleCombinationConfig | Rules defines the combination of conditions using AND/OR logic | ||
modelRefs ModelRefConfig array | ModelRefs contains model references for this decision | Optional: {} | |
preferred_endpoints string array | PreferredEndpoints specifies which vLLM endpoints to prefer for this decision | Optional: {} | |
plugins RawExtension array | Plugins contains policy configurations applied after rule matching | Optional: {} | |
algorithm JSON | Algorithm configures base model selection for this decision. It is preserved as a router-owned object so supported algorithms can evolve without requiring the operator CRD to duplicate every nested field. | Type: object Optional: {} |
EmbeddingEndpointConfig
EmbeddingEndpointConfig defines an external OpenAI-compatible embedding endpoint.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
base_url string | BaseURL is the base URL for the embedding endpoint, typically ending in /v1. | Optional: {} | |
model string | Model is the embedding model name sent to the external provider. | Optional: {} | |
api_key_env string | APIKeyEnv names the environment variable containing the provider API key. | Optional: {} | |
timeout_seconds integer | TimeoutSeconds is the request timeout for embedding calls. | Minimum: 0 Optional: {} | |
max_retries integer | MaxRetries is the maximum number of retry attempts for embedding calls. | Minimum: 0 Optional: {} | |
dimensions integer | Dimensions requests a provider-side output dimension when supported. | Minimum: 1 Optional: {} |
EmbeddingModelsConfig
EmbeddingModelsConfig defines configuration for embedding models
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
qwen3_model_path string | Path to Qwen3-Embedding-0.6B model directory Qwen3 provides 32K context and high quality embeddings (1024 dimensions) | Optional: {} | |
gemma_model_path string | Path to EmbeddingGemma-300M model directory Gemma provides 8K context and fast embeddings (768 dimensions) | Optional: {} | |
mmbert_model_path string | Path to mmBERT 2D Matryoshka embedding model directory Supports layer early exit (3/6/11/22) and dimension reduction (64-768) | Optional: {} | |
use_cpu boolean | Use CPU for inference (default: true) | true | Optional: {} |
embedding_config HNSWEmbeddingConfig | Embedding configuration for embedding-based classification | Optional: {} | |
endpoint EmbeddingEndpointConfig | Endpoint configures an external embedding provider endpoint. The API key should be injected into the semantic router pod environment and referenced by APIKeyEnv rather than stored directly in the CR. | Optional: {} |
ExporterConfig
ExporterConfig defines exporter configuration
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
type string | otlp | Optional: {} | |
endpoint string | jaeger:4317 | Optional: {} | |
insecure boolean | true | Optional: {} |
GatewayReference
GatewayReference references an existing Gateway
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
name string | Name of the Gateway | MinLength: 1 | |
namespace string | Namespace of the Gateway | MinLength: 1 |
GatewaySpec
GatewaySpec defines Gateway API integration configuration
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
existingRef GatewayReference | ExistingRef references an existing Gateway to use | Optional: {} |
HNSWCacheConfig
HNSWCacheConfig defines HNSW index configuration for hybrid/in-memory backends.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
use_hnsw boolean | UseHNSW enables HNSW indexing for faster similarity search | false | Optional: {} |
hnsw_m integer | M is the number of bi-directional links per node | 16 | Minimum: 2 Optional: {} |
hnsw_ef_construction integer | EfConstruction is the size of dynamic candidate list during construction | 200 | Minimum: 1 Optional: {} |
max_memory_entries integer | MaxMemoryEntries limits in-memory entries for hybrid backend | 1000 | Minimum: 0 Optional: {} |
HNSWEmbeddingConfig
HNSWEmbeddingConfig contains settings for embedding classification with HNSW indexing
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
backend string | Backend selects the embedding provider backend. | Enum: [candle openvino openai_compatible] Optional: {} | |
model_type string | ModelType specifies which embedding model to use Options: "qwen3" (1024-dim, 32K context), "gemma" (768-dim, 8K context), "mmbert" (64-768-dim, multilingual), "remote" (external provider) | Enum: [qwen3 gemma mmbert remote] Optional: {} | |
preload_embeddings boolean | PreloadEmbeddings enables precomputing candidate embeddings at startup | true | Optional: {} |
target_dimension integer | TargetDimension is the embedding dimension to use (default: 768) For mmBERT, supported local dimensions are 64, 128, 256, 512, 768. External providers may use other positive dimensions such as 1024, 1536, or 3072. | Minimum: 1 Optional: {} | |
target_layer integer | TargetLayer controls mmBERT early exit and is used only when ModelType is "mmbert". Lower layers reduce encoder work but may reduce quality; layer 22 uses the full encoder depth. Evaluate the latency and quality trade-off on representative deployment data. | Enum: [3 6 11 22] Optional: {} | |
enable_soft_matching boolean | EnableSoftMatching enables soft matching mode | true | Optional: {} |
min_score_threshold string | MinScoreThreshold for matching (0.0-1.0). Stored as string to avoid float precision issues. | 0.5 | Pattern: ^0(\.[0-9]+)?$|^1(\.0+)?$ Optional: {} |
ImageSpec
ImageSpec defines the container image configuration
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
repository string | Repository is the container image repository | ghcr.io/vllm-project/semantic-router/extproc | Optional: {} |
tag string | Tag is the container image tag | latest | Optional: {} |
pullPolicy PullPolicy | PullPolicy is the image pull policy | IfNotPresent | Enum: [Always Never IfNotPresent] Optional: {} |
imageRegistry string | ImageRegistry is an optional registry prefix | Optional: {} |
IngressHost
IngressHost defines an ingress host
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
host string | Optional: {} | ||
paths IngressPath array | Optional: {} |
IngressPath
IngressPath defines an ingress path
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
path string | Optional: {} | ||
pathType string | Optional: {} | ||
servicePort integer | Optional: {} |
IngressSpec
IngressSpec defines ingress configuration
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
enabled boolean | Enabled indicates if ingress is enabled | false | Optional: {} |
className string | ClassName is the ingress class name | Optional: {} | |
annotations object (keys:string, values:string) | Annotations for ingress | Optional: {} | |
hosts IngressHost array | Hosts configuration | Optional: {} | |
tls IngressTLS array | TLS configuration | Optional: {} |
IngressTLS
IngressTLS defines ingress TLS configuration
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
secretName string | Optional: {} | ||
hosts string array | Optional: {} |
LoRAAdapterSpec
LoRAAdapterSpec defines one LoRA adapter exposed by a VLLMEndpoint model.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
name string | Name is the unique adapter identifier referenced by decision.modelRefs[].lora_name. | MaxLength: 100 MinLength: 1 | |
description string | Description provides a short human-readable summary for UI and docs surfaces. | MaxLength: 500 Optional: {} |
MetricsPortSpec
MetricsPortSpec extends PortSpec with enable flag
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
port integer | Port is the service port | Maximum: 65535 Minimum: 1 Optional: {} | |
targetPort integer | TargetPort is the container port | Maximum: 65535 Minimum: 1 Optional: {} | |
protocol Protocol | Protocol is the port protocol | TCP | Optional: {} |
enabled boolean | Enabled indicates if metrics should be exposed | true | Optional: {} |
MilvusCacheAuth
MilvusCacheAuth defines Milvus authentication.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
enabled boolean | Enabled controls whether to use authentication | false | Optional: {} |
username string | Username for Milvus authentication | Optional: {} | |
password string | Password for Milvus authentication (plaintext - consider using PasswordSecretRef instead) | Optional: {} | |
password_secret_ref SecretKeySelector | PasswordSecretRef references a Secret containing the Milvus password Preferred over plaintext Password field for security | Optional: {} |
MilvusCacheBatch
MilvusCacheBatch defines batch operation settings.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
insert_batch_size integer | InsertBatchSize for bulk inserts | 100 | Minimum: 1 Optional: {} |
timeout integer | Timeout for batch operations in seconds | 60 | Minimum: 0 Optional: {} |
MilvusCacheCollection
MilvusCacheCollection defines Milvus collection configuration.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
name string | Name of the Milvus collection | semantic_cache | Optional: {} |
description string | Description of the collection | Semantic cache for LLM request-response pairs | Optional: {} |
vector_field MilvusCacheVectorField | VectorField configuration for embeddings | Optional: {} | |
index MilvusCacheCollectionIndex | Index configuration for the collection | Optional: {} |
MilvusCacheCollectionIndex
MilvusCacheCollectionIndex defines collection index settings.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
type string | Type of index algorithm | HNSW | Enum: [HNSW IVF_FLAT IVF_SQ8 IVF_PQ] Optional: {} |
params MilvusCacheIndexParams | Params for the index | Optional: {} |
MilvusCacheCompaction
MilvusCacheCompaction defines compaction settings.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
enabled boolean | Enabled controls whether auto-compaction is active | false | Optional: {} |
interval integer | Interval in seconds between compaction runs | 86400 | Minimum: 0 Optional: {} |
MilvusCacheConfig
MilvusCacheConfig defines Milvus cache backend configuration. Configure these settings when using Milvus as the semantic cache backend.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
connection MilvusCacheConnection | Connection settings for Milvus server | Optional: {} | |
collection MilvusCacheCollection | Collection settings for Milvus | Optional: {} | |
search MilvusCacheSearch | Search settings for Milvus queries | Optional: {} | |
performance MilvusCachePerformance | Performance tuning for Milvus | Optional: {} | |
data_management MilvusCacheDataManagement | DataManagement settings for TTL and compaction | Optional: {} | |
development MilvusCacheDevelopment | Development settings for Milvus cache | Optional: {} |
MilvusCacheConnection
MilvusCacheConnection defines Milvus connection parameters.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
host string | Host is the Milvus server hostname or IP address | Optional: {} | |
port integer | Port is the Milvus server port | 19530 | Maximum: 65535 Minimum: 1 Optional: {} |
database string | Database name in Milvus | semantic_router_cache | Optional: {} |
timeout integer | Timeout for Milvus operations in seconds | 30 | Minimum: 0 Optional: {} |
auth MilvusCacheAuth | Auth configuration for Milvus authentication | Optional: {} | |
tls MilvusCacheTLS | TLS configuration for secure Milvus connections | Optional: {} |
MilvusCacheConnectionPool
MilvusCacheConnectionPool defines connection pool settings.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
max_connections integer | MaxConnections in the pool | 10 | Minimum: 1 Optional: {} |
max_idle_connections integer | MaxIdleConnections to keep | 5 | Minimum: 0 Optional: {} |
acquire_timeout integer | AcquireTimeout in seconds | 30 | Minimum: 0 Optional: {} |
MilvusCacheDataManagement
MilvusCacheDataManagement defines data lifecycle settings.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
ttl MilvusCacheTTL | TTL settings for automatic expiration | Optional: {} | |
compaction MilvusCacheCompaction | Compaction settings | Optional: {} |
MilvusCacheDevelopment
MilvusCacheDevelopment defines development-mode settings.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
drop_collection_on_startup boolean | DropCollectionOnStartup clears the collection when router starts (for testing) | false | Optional: {} |
auto_create_collection boolean | AutoCreateCollection automatically creates the collection if it doesn't exist | true | Optional: {} |
verbose_errors boolean | VerboseErrors includes detailed error messages in logs | true | Optional: {} |
MilvusCacheIndexParams
MilvusCacheIndexParams defines index parameters.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
M integer | M is the number of bi-directional links for HNSW | 16 | Minimum: 2 Optional: {} |
efConstruction integer | EfConstruction for HNSW index building | 64 | Minimum: 1 Optional: {} |
MilvusCachePerformance
MilvusCachePerformance defines performance tuning.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
connection_pool MilvusCacheConnectionPool | ConnectionPool settings | Optional: {} | |
batch MilvusCacheBatch | Batch settings for operations | Optional: {} |