feature: declare cross-encoder rerankers in model_catalog
#2,250 opened on Jun 18, 2026
Repository metrics
- Stars
- (4,293 stars)
- PR merge metrics
- (PR metrics pending)
Description
Audited upstream baseline (2026-07-15)
Current main has no general cross-encoder reranker runtime, /v1/rerank endpoint, or SR_CROSS_ENCODER_MODEL_* configuration. PR #2236 proposes that foundation but remains open and unmerged; its branch-level environment variables are not a released compatibility contract.
This issue defines the production configuration and lifecycle contract that should accompany or follow the base runtime, without describing the open PR as current behavior.
Scope
- Add a typed cross-encoder/reranker declaration to the canonical model catalog.
- Validate model identity, architecture/runtime compatibility, artifact source, limits, and credentials.
- Load/unload it through the shared model-runtime lifecycle.
- Expose capability and readiness through model inventory/diagnostics.
- Document migration only if an interim surface actually ships.
Boundaries
- Do not standardize open-PR environment variables as the long-term public API.
- Do not couple the model declaration to one routing signal or endpoint.
- Do not claim a model is ready before artifact/runtime validation succeeds.
- Keep secrets out of config projections, diagnostics, and Replay.
Acceptance criteria
- Rerankers have a canonical, round-trippable config declaration.
- Unknown or incompatible declarations fail with actionable diagnostics.
- Runtime inventory reports configured, loading, ready, and failed states.
- Config/reference/docs contract tests cover the new surface.
- CPU/model-free CI validates schema and lifecycle behavior; model receipts validate real inference separately.
Relevant surfaces
src/semantic-router/pkg/config, src/semantic-router/pkg/modelruntime, src/semantic-router/pkg/modelinventory, capability inventory (#2358), docs, and tests.
Related: PR #2236, architecture #2247, routing integration #2251.