mirror of
https://github.com/katanemo/plano.git
synced 2026-06-08 14:55:14 +02:00
make selection_policy optional, defaults to prefer: none
This commit is contained in:
parent
0ff166e0f6
commit
bac03b7583
2 changed files with 4 additions and 3 deletions
|
|
@ -502,7 +502,6 @@ properties:
|
|||
- name
|
||||
- description
|
||||
- models
|
||||
- selection_policy
|
||||
|
||||
model_metrics_sources:
|
||||
type: array
|
||||
|
|
|
|||
|
|
@ -104,16 +104,17 @@ pub enum StateStorageType {
|
|||
Postgres,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
|
||||
#[derive(Debug, Clone, Default, Serialize, Deserialize, PartialEq, Eq)]
|
||||
#[serde(rename_all = "lowercase")]
|
||||
pub enum SelectionPreference {
|
||||
Cheapest,
|
||||
Fastest,
|
||||
/// Return models in the same order they were defined — no reordering.
|
||||
#[default]
|
||||
None,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
|
||||
pub struct SelectionPolicy {
|
||||
pub prefer: SelectionPreference,
|
||||
}
|
||||
|
|
@ -123,6 +124,7 @@ pub struct TopLevelRoutingPreference {
|
|||
pub name: String,
|
||||
pub description: String,
|
||||
pub models: Vec<String>,
|
||||
#[serde(default)]
|
||||
pub selection_policy: SelectionPolicy,
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue