Japanese version: ICapabilityRegistry (インターフェース仕様)
ICapabilityRegistry (Interface Specification)
1. Responsibility Boundary
ICapabilityRegistry is the boundary interface that manages the inventory of available model/provider capabilities and supplies routing facts for decision-making.
- Role:
- Non-role:
Register, retrieve, and resolve candidates based on ModelCapacityVector data.
Final optimization/scoring and route selection are owned by IModelVectorRouter.
2. Contract Signature
namespace AIKernel.Abstractions.Routing;\n\npublic interface ICapabilityRegistry\n{\n ValueTask RegisterCapabilityAsync(\n string providerId,\n ModelCapacityVector capacityVector,\n CancellationToken cancellationToken = default);\n\n ValueTask<ModelCapacityVector?> GetCapabilityAsync(\n string providerId,\n CancellationToken cancellationToken = default);\n\n ValueTask<IReadOnlyList<string>> ResolveCandidatesAsync(\n RuleEvaluationContext context,\n CancellationToken cancellationToken = default);\n}
3. Related Use Cases
UC-03Model vector routing:UC-22Dynamic capacity control and model routing:
Provides the candidate universe consumed by the router.
Supports candidate resolution under runtime changes and constraints.
4. Governance & Determinism
- Deterministic candidate resolution:
- Data integrity protection:
For identical registry state and RuleEvaluationContext, ResolveCandidatesAsync must return the same candidates in the same order.
RegisterCapabilityAsync should be restricted to trusted administration paths; unauthorized mutations must be rejected by design.
5. Exception Contract
This interface does not hard-code exception types. Implementations should explicitly handle:
- Unknown provider lookup:
- Registry conflicts:
Failed retrieval for non-existent providerId.
Conflicting capability registration for the same provider ID.
6. Implementation Notes
- Fast lookup:
- Policy-aware filtering:
Use low-latency indexing/caching structures for frequent reads.
ResolveCandidatesAsync should apply governance filters from RuleEvaluationContext, not only liveness checks.
Changelog
- v0.0.0 / v0.0.0.0: Initial draft
- v0.0.1 (2026-05-06): Version upgrade aligned with documentation guidelines
architecture/interfaces/routing/ICapabilityRegistry.md