Skip to content

Support filter chains on model listeners#771

Draft
adilhafeez wants to merge 2 commits intomainfrom
adilhafeez/model-listener-filter-chain
Draft

Support filter chains on model listeners#771
adilhafeez wants to merge 2 commits intomainfrom
adilhafeez/model-listener-filter-chain

Conversation

@adilhafeez
Copy link
Contributor

Summary

  • Adds filter_chain support on model-type listeners, allowing input guardrails on direct LLM proxy requests without an agent layer
  • Reuses the existing PipelineProcessor.process_filter_chain() subsystem from agent listeners
  • Validates filter_chain IDs in Python config generator

Closes #729

Changes

  • Config schema: Added filter_chain (array of strings) to listener object
  • Rust Listener struct: Added filter_chain: Option<Vec<String>> field
  • LLM handler: After request parsing, checks for model listener filter chain, runs PipelineProcessor.process_filter_chain(), updates messages or returns error
  • Config validation: Validates filter_chain IDs reference valid agent/filter IDs
  • Reference config + tests: Updated for new field

Test plan

  • cargo test --lib — 294 passed
  • cargo clippy -- -D warnings — clean
  • WASM build (wasm32-wasip1) — successful
  • uv run pytest -v — 34 passed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support Filter Chains on type: model listeners (LLM provider proxy)

1 participant