mirror of
https://github.com/katanemo/plano.git
synced 2026-05-02 04:12:56 +02:00
support filter chains on model listeners
This commit is contained in:
parent
21b043e6d0
commit
8136d7d6ab
8 changed files with 121 additions and 1 deletions
|
|
@ -426,6 +426,16 @@ def validate_and_render_schema():
|
|||
"Please provide model_providers either under listeners or at root level, not both. Currently we don't support multiple listeners with model_providers"
|
||||
)
|
||||
|
||||
# Validate filter_chain IDs on listeners reference valid agent/filter IDs
|
||||
for listener in listeners:
|
||||
listener_filter_chain = listener.get("filter_chain", [])
|
||||
for fc_id in listener_filter_chain:
|
||||
if fc_id not in agent_id_keys:
|
||||
raise Exception(
|
||||
f"Listener '{listener.get('name', 'unknown')}' references filter_chain id '{fc_id}' "
|
||||
f"which is not defined in agents or filters. Available ids: {', '.join(sorted(agent_id_keys))}"
|
||||
)
|
||||
|
||||
# Validate model aliases if present
|
||||
if "model_aliases" in config_yaml:
|
||||
model_aliases = config_yaml["model_aliases"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue