API 参考
软件包
vllm.ai/v1alpha1
软件包 v1alpha1 包含了 v1alpha1 API 组的 API Schema 定义。
资源类型
Decision (决策)
Decision 定义了基于规则组合的路由决策。
出现位置:
| 字段 | 描述 | 默认值 | 验证 |
|---|---|---|---|
name string | Name 是此决策的唯一标识符 | MaxLength: 100 MinLength: 1 Required: {} | |
priority integer | Priority 定义了此决策的优先级(值越高 = 优先级越高) 当策略为 "priority" 时使用 | 0 | Maximum: 1000 Minimum: 0 |
description string | Description 提供了对此决策的人类可读描述 | MaxLength: 500 | |
signals SignalCombination | Signals 定义了信号组合逻辑 | Required: {} | |
modelRefs ModelRef array | ModelRefs 定义了此决策的模型引用(目前仅支持一个模型) | MaxItems: 1 MinItems: 1 Required: {} | |
plugins DecisionPlugin array | Plugins 定义了应用于此决策的插件 | MaxItems: 10 |
DecisionPlugin (决策插件)
DecisionPlugin 定义了决策的插件配置。
出现位置:
| 字段 | 描述 | 默认值 | 验证 |
|---|---|---|---|
type string | Type 是插件类型 (semantic-cache, jailbreak, pii, system_prompt, header_mutation) | Enum: [semantic-cache jailbreak pii system_prompt header_mutation] Required: {} | |
configuration RawExtension | Configuration 是作为原始 JSON 对象的插件特定配置 | Schemaless: {} |
DomainSignal (领域信号)
DomainSignal 定义了用于分类的领域类别。
出现位置:
| 字段 | 描述 | 默认值 | 验证 |
|---|---|---|---|
name string | Name 是此领域的唯一标识符 | MaxLength: 100 MinLength: 1 Required: {} | |
description string | Description 提供了对此领域的人类可读描述 | MaxLength: 500 |
EmbeddingSignal (嵌入信号)
EmbeddingSignal 定义了基于嵌入的信号提取规则。
出现位置:
| 字段 | 描述 | 默认值 | 验证 |
|---|---|---|---|
name string | Name 是此信号的唯一标识符 | MaxLength: 100 MinLength: 1 Required: {} | |
threshold float | Threshold 是匹配的相似度阈值 (0.0-1.0) | Maximum: 1 Minimum: 0 Required: {} | |
candidates string array | Candidates 是用于语义匹配的候选短语列表 | MaxItems: 100 MinItems: 1 Required: {} | |
aggregationMethod string | AggregationMethod 定义了如何聚合多个候选相似度 | max | Enum: [mean max any] |
IntelligentPool (智能池)
IntelligentPool 定义了带有配置的模型池。
出现位置:
| 字段 | 描 述 | 默认值 | 验证 |
|---|---|---|---|
apiVersion string | vllm.ai/v1alpha1 | ||
kind string | IntelligentPool | ||
metadata ObjectMeta | 有关 metadata 的字段,请参阅 Kubernetes API 文档。 | ||
spec IntelligentPoolSpec | |||
status IntelligentPoolStatus |
IntelligentPoolList (智能池列表)
IntelligentPoolList 包含 IntelligentPool 列表。
| 字段 | 描述 | 默认值 | 验证 |
|---|---|---|---|
apiVersion string | vllm.ai/v1alpha1 | ||
kind string | IntelligentPoolList | ||
metadata ListMeta | 有关 metadata 的字段,请参阅 Kubernetes API 文档。 | ||
items IntelligentPool array |
IntelligentPoolSpec (智能池规范)
IntelligentPoolSpec 定义了 IntelligentPool 的期望状态。
出现位置:
| 字段 | 描述 | 默认值 | 验证 |
|---|---|---|---|
defaultModel string | DefaultModel 指定未选择特定模型时使用的默认模型 | MaxLength: 100 MinLength: 1 Required: {} | |
models ModelConfig array | Models 定义了此池中可用模型的列表 | MaxItems: 100 MinItems: 1 Required: {} |
IntelligentPoolStatus (智能池状态)
IntelligentPoolStatus 定义了观察到的 IntelligentPool 状态。
出现位置:
| 字段 | 描述 | 默认值 | 验证 |
|---|---|---|---|
conditions Condition array | Conditions 代表 IntelligentPool 状态的最新可用观察结果 | ||
observedGeneration integer | ObservedGeneration 反映了最近观察到的 IntelligentPool 的代 (generation) | ||
modelCount integer | ModelCount 表示池中模型的数量 |
IntelligentRoute (智能路由)
IntelligentRoute 定义了智能路由规则和决策。
出现位置:
| 字段 | 描述 | 默认值 | 验证 |
|---|---|---|---|
apiVersion string | vllm.ai/v1alpha1 | ||
kind string | IntelligentRoute | ||
metadata ObjectMeta | 有关 metadata 的字段,请参阅 Kubernetes API 文档。 | ||
spec IntelligentRouteSpec | |||
status IntelligentRouteStatus |
IntelligentRouteList (智能路由列表)
IntelligentRouteList 包含 IntelligentRoute 列表。
| 字段 | 描述 | 默认值 | 验证 |
|---|---|---|---|
apiVersion string | vllm.ai/v1alpha1 | ||
kind string | IntelligentRouteList | ||
metadata ListMeta | 有关 metadata 的字段,请参阅 Kubernetes API 文档。 | ||
items IntelligentRoute array |
IntelligentRouteSpec (智能路由规范)
IntelligentRouteSpec 定义了 IntelligentRoute 的期望状态。
出现位置:
| 字段 | 描述 | 默认值 | 验证 |
|---|---|---|---|
signals Signals | Signals 定义了用于路由决策的信号提取规则 | ||
decisions Decision array | Decisions 定义了基于信号组合的路由决策 | MaxItems: 100 MinItems: 1 Required: {} |