mirror of
https://github.com/katanemo/plano.git
synced 2026-05-21 13:55:15 +02:00
Validate model listener filter references before serving traffic (#947)
* Validate output filter references * ci: trigger workflows for org member
This commit is contained in:
parent
5a4487fc6e
commit
241a181d3a
3 changed files with 160 additions and 26 deletions
|
|
@ -327,6 +327,63 @@ routing_preferences:
|
|||
tracing:
|
||||
random_sampling: 100
|
||||
|
||||
""",
|
||||
},
|
||||
{
|
||||
"id": "unknown_listener_output_filter",
|
||||
"expected_error": "references output_filters id 'missing_output_guard'",
|
||||
"plano_config": """
|
||||
version: v0.4.0
|
||||
|
||||
filters:
|
||||
- id: input_guard
|
||||
url: http://localhost:10500
|
||||
type: http
|
||||
|
||||
listeners:
|
||||
- name: llm
|
||||
type: model
|
||||
port: 12000
|
||||
input_filters:
|
||||
- input_guard
|
||||
output_filters:
|
||||
- missing_output_guard
|
||||
|
||||
model_providers:
|
||||
- model: openai/gpt-4o-mini
|
||||
access_key: $OPENAI_API_KEY
|
||||
default: true
|
||||
|
||||
""",
|
||||
},
|
||||
{
|
||||
"id": "valid_listener_output_filter",
|
||||
"expected_error": None,
|
||||
"plano_config": """
|
||||
version: v0.4.0
|
||||
|
||||
filters:
|
||||
- id: input_guard
|
||||
url: http://localhost:10500
|
||||
type: http
|
||||
- id: output_guard
|
||||
url: http://localhost:10501
|
||||
type: http
|
||||
|
||||
listeners:
|
||||
- name: llm
|
||||
type: model
|
||||
port: 12000
|
||||
input_filters:
|
||||
- input_guard
|
||||
output_filters:
|
||||
- output_guard
|
||||
|
||||
model_providers:
|
||||
- model: openai/gpt-4o-mini
|
||||
access_key: $OPENAI_API_KEY
|
||||
default: true
|
||||
|
||||
""",
|
||||
},
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue