Skip to content

feature: add policy-driven signal and model selection primitives #2740

Description

@Xunzhuo

Problem

The router can compose boolean signal matches, but several policy inputs still require ad hoc integrations: caller-supplied metadata, reusable generic label classifiers, numeric score gates at decision leaves, and bounded prompt-driven choice among a decision's candidate models.

Proposed scope

  • add bounded, untrusted request metadata and request-envelope facts as normal signals
  • expose reusable local and external-LLM classifier labels with explicit score predicates and error policy
  • add deterministic prompt-driven selection over declared modelRefs
  • keep evaluation recipe-scoped and preserve diagnostics in replay
  • provide canonical config validation, examples, documentation, and behavior-level coverage

Acceptance criteria

  • existing configurations remain backward compatible
  • new config fields round-trip through Router, CLI, and Dashboard contracts
  • prompt/classifier output is schema-validated and cannot select undeclared labels or models
  • local tests, smoke checks, and CI pass

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions