Skip to content

feat(core): add DetectorMode::Model for classifier-backed feedback detection #2210

@bug-ops

Description

@bug-ops

Background

Issue #2190 introduced Candle-backed injection classifier infrastructure. The FeedbackDetector in zeph-core currently supports two modes:

  • Regex (default)
  • Judge (LLM-backed)

A third Model variant using the ClassifierBackend trait would enable fast, offline, CPU-based feedback detection without an LLM round-trip.

Required work

  1. Add DetectorMode::Model { repo_id: String } variant to the config enum in zeph-config
  2. Add ClassifierBackend integration to FeedbackDetector in zeph-core
  3. Add zeph-core dependency on zeph-llm classifier module (or extract ClassifierBackend trait to a shared crate)
  4. Wire detector_mode = "model" in config parsing
  5. Add tests for the new variant

Notes

  • FeedbackDetector lives in crates/zeph-core/src/agent/feedback_detector.rs
  • ClassifierBackend trait is in crates/zeph-llm/src/classifier/mod.rs
  • This is a cross-crate dependency change — requires careful consideration of the dependency graph
  • Deferred from PR test(candle): add integration tests for Candle-backed classifier models #2190 (test infrastructure PR) as it requires implementing a new feature, not just tests

Metadata

Metadata

Assignees

Labels

P3Research — medium-high complexityenhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions