AIKernel.NET
version: 0.0.2 / status: Refactor / edition: Draft / published: 2026-05-16 / updated: 2026-05-16

Japanese version: IProvider (インターフェース仕様)

IProvider (Interface Specification)

1. Responsibility Boundary

IProvider is the abstraction boundary that normalizes concrete AI service differences and exposes a consistent compute-resource interface to the kernel.

  • Role:
  • Define shared lifecycle operations for identity, capabilities, availability, initialization/shutdown, and health diagnostics.

  • Non-role:
  • Routing decisions belong to IModelVectorRouter; higher-level reasoning orchestration is outside provider scope.

2. Contract Signature

namespace AIKernel.Abstractions.Providers;\n\npublic interface IProvider\n{\n    string ProviderId { get; }\n    string Name { get; }\n    string Version { get; }\n    IProviderCapabilities GetCapabilities();\n    Task<bool> IsAvailableAsync();\n    Task InitializeAsync();\n    Task ShutdownAsync();\n    Task<ProviderHealthStatus> GetHealthAsync();\n}
  • UC-03 Model vector routing:
  • GetCapabilities() supplies prerequisite data for candidate selection.

  • UC-22 Dynamic capacity control and routing:
  • GetHealthAsync() and IsAvailableAsync() feed dynamic weighting and exclusion decisions.

  • UC-23 Multi-provider failover:
  • Supports safe fallback when provider availability changes.

4. Governance & Determinism

  • Fail-Closed:
  • If IsAvailableAsync() fails or InitializeAsync() cannot complete, exclude the provider from execution routes.

  • State transparency:
  • GetCapabilities() and GetHealthAsync() should reflect operational reality to preserve audit explainability.

5. Implementation Notes

  • Resilience:
  • Retries/circuit breakers are acceptable, but resulting state must remain observable via GetHealthAsync().

  • Secret handling:
  • Keep credentials internal to implementations and never leak provider-specific secrets through contracts.


Changelog

  • v0.0.0 / v0.0.0.0: Initial draft
  • v0.0.1 (2026-05-06): Version upgrade aligned with documentation guidelines
Source: architecture/interfaces/provider/IProvider.md