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 |
ComplexityModelConfig
ComplexityModelConfig configures how the complexity signal produces its score. It mirrors global.model_catalog.modules.complexity in the router config and is passed through field for field.
The contract requirement sits here rather than on RemoteClassifierBackendConfig because it is a property of this consumer, not of the block: complexity reads two response shapes, so guessing wrong would surface per request instead of at admission. A consumer that reads one shape
- categories does - keeps the field optional and defaults it.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
backend RemoteClassifierBackendConfig | Backend names a remote scoring model. Its absence keeps local prototype scoring; when set, the signal never reads the rules' hard/easy candidates. It sits on the module rather than on a rule because routing signals are replaced wholesale per recipe, so a per-rule backend would vanish under any recipe that did not repeat it. | Optional: {} |
ComplexityRulesConfig
ComplexityRulesConfig defines complexity-based signal classification.
The CEL rules below reject at admission the boundary combinations the Router refuses at config load. Without them the API server accepts the object and the Router crashloops on it, which turns a typo into an outage instead of a rejected write. They are per-object and static; anything needing the model catalog - whether backend.model resolves, for instance - stays with the Router's validator, which remains the single source of truth for the rest.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
prototype_scoring PrototypeScoringConfig | PrototypeScoring replaces the family prototype-scoring configuration for this rule. Absence inherits the family; a present object is a complete override, including an empty object. Defaults remain Router-owned. | Optional: {} | |
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 the local prototype-scoring path (0.0-1.0), stored as a string to avoid float precision issues. The local margin is hard-minus-easy and centred on zero, so the threshold is symmetric: a margin above it is "hard", below its negative is "easy", and in between is "medium". It does not apply under a score.v1 backend, whose score is in the model's own units; state a boundary pair instead. | Pattern: ^0(\.[0-9]+)?$|^1(\.0+)?$ Optional: {} | |
hard_above string | HardAbove and EasyBelow are the two cut points for a score where a higher value is harder, in the scoring model's own units - so no [0,1] pattern applies and negative values are valid. Both are required together, and the pair is mutually exclusive with Threshold and with HardBelow/EasyAbove. Stored as strings to avoid float precision issues. | Pattern: ^-?[0-9]+(\.[0-9]+)?$ Optional: {} | |
easy_below string | EasyBelow is the lower cut point of the harder-when-higher pair: a score below it is "easy", and anything between EasyBelow and HardAbove is "medium". It must be below HardAbove, and both are required together. | Pattern: ^-?[0-9]+(\.[0-9]+)?$ Optional: {} | |
hard_below string | HardBelow and EasyAbove are the pair for a score where a lower value is harder - a model predicting the chance of a correct answer, say. They require a score.v1 backend: the local margin is harder-when-higher by construction, and inverting it locally means swapping the candidate lists. Stored as strings to avoid float precision issues. | Pattern: ^-?[0-9]+(\.[0-9]+)?$ Optional: {} | |
easy_above string | EasyAbove is the upper cut point of the harder-when-lower pair: a score above it is "easy", and anything between HardBelow and EasyAbove is "medium". It must be above HardBelow, and both are required together. | Pattern: ^-?[0-9]+(\.[0-9]+)?$ Optional: {} | |
hard ComplexityCandidates | Hard candidates represent complex/difficult examples. Read only by the local path; a remote backend never consults them, so they are optional. | Optional: {} | |
easy ComplexityCandidates | Easy candidates represent simple/easy examples. Read only by the local path; a remote backend never consults them, so they are optional. | Optional: {} | |
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: {} | |
model_deployments JSON | ModelDeployments contains canonical global.model_catalog.deployments. The router validates provider, device, precision and task compatibility. | Type: object Optional: {} | |
model_admission JSON | ModelAdmission contains canonical global.model_catalog.admission budgets. Keys name deployments or the router's existing admission consumers. | 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: {} | |
complexity_model ComplexityModelConfig | ComplexityModel says how the complexity signal produces its score. Absent, the signal scores locally against each rule's hard/easy candidates. With a backend, a remote model produces the score and the candidates are never read. Mirrors global.model_catalog.modules.complexity in the router config. | Optional: {} | |
external_models ExternalModelConfig array | ExternalModels declares the remote models that classifier backends ( classifier.pii.backend.model, complexity_model.backend.model) andthe prompt guard protocol refer to by name. Mirrors global.model_catalog.external[] in the router config field for field; the router's own validator decides whether a backend resolves against it. | 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_effort string | ReasoningEffort is the default reasoning effort for model bindings that do not select a different effort. The selected model family validates the value because built-in and custom families may expose different ladders. | Optional: {} | |
api APIConfig | API configuration | Optional: {} | |
observability ObservabilityConfig | Observability configuration | Optional: {} | |
streamed_body StreamedBodyConfig | StreamedBody enables streamed request body handling. Mirrors global.router.streamed_body; the gateway must send bodies to ExtProc in STREAMED or FullDuplexStreamed mode for it to take effect. | 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: {} | |
max_response_bytes integer | MaxResponseBytes caps the size of each embedding response body. | 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: {} |
ExternalModelConfig
ExternalModelConfig is one entry of global.model_catalog.external[]: a remote model a classifier backend or the prompt guard can name. Field names are the router's YAML keys so the generic typed conversion carries them unchanged.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
name string | Name is the catalog name a backend block refers to in its model field. | MinLength: 1 | |
model_role string | ModelRole is what the model is used for; classifier backends require "classification", the prompt guard protocol requires "guardrail". | MinLength: 1 | |
llm_model_name string | ModelName is the model identifier the remote service expects, and the value a token_spans.v1 envelope's model member must equal. | MinLength: 1 | |
llm_endpoint ExternalModelEndpoint | Endpoint is where the remote model is reached. | ||
llm_timeout_seconds integer | TimeoutSeconds bounds one call when the backend block sets no deadline. | Minimum: 1 Optional: {} |
ExternalModelEndpoint
ExternalModelEndpoint is the address of a remote classification model.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
address string | MinLength: 1 | ||
port integer | Maximum: 65535 Minimum: 1 | ||
protocol string | Enum: [http https] 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 |