consolidate model filter chain into single struct, move validation to config generator

This commit is contained in:
Adil Hafeez 2026-03-13 13:38:40 -07:00
parent e41e9e1cf4
commit edf782f07a
No known key found for this signature in database
GPG key ID: 9B18EF7691369645
4 changed files with 54 additions and 54 deletions

View file

@ -426,6 +426,13 @@ 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 at most one model listener
model_listeners = [l for l in listeners if l.get("type") == "model"]
if len(model_listeners) > 1:
raise Exception(
f"Only one model listener is allowed, found {len(model_listeners)}"
)
# Validate filter_chain IDs on listeners reference valid agent/filter IDs
for listener in listeners:
listener_filter_chain = listener.get("filter_chain", [])