For Japanese version, see IProviderCreditInfo-jp.md.
IProviderCreditInfo (Interface Specification)
1. Responsibility Boundary
IProviderCreditInfo exposes provider-level balance, reservation, and limit data so orchestration can enforce cost-safe execution.
- Role:
- Non-role:
Provide spendable balance, reserved amount, hard/soft ceilings, and refresh timestamp.
Purchase/refund settlement workflows are outside this contract.
2. Properties
| Property | Type | Description |
|---|---|---|
ProviderId |
string |
Logical provider identifier. |
CurrencyCode |
string |
Billing currency (ISO 4217). |
CurrentBalance |
decimal |
Remaining spendable credit. |
ReservedBalance |
decimal |
Amount reserved by running jobs. |
HardLimit |
decimal |
Absolute spend ceiling. |
SoftLimit |
decimal |
Alert threshold before hard limit. |
LastUpdatedUtc |
DateTimeOffset |
Last refresh timestamp. |
3. Use Cases
UC-23AI credit management:UC-19Parallel multi-model execution:
Trigger warnings, low-cost route shifts, or execution gating when balance is tight.
Use ReservedBalance to prevent double-spend under concurrency.
4. Integration with IModelVectorRouter
- Liveness check:
- Soft throttling:
- Hard cutoff:
Exclude candidates when estimated cost exceeds CurrentBalance - ReservedBalance.
Penalize candidates approaching SoftLimit and prefer healthier balances.
Isolate candidates at HardLimit or depleted balance and force fallback routes.
5. Visualization Mapping (Pie Chart)
- Available share:
- Reserved share:
- Consumed share:
- Labels:
CurrentBalance - ReservedBalance
ReservedBalance
HardLimit - CurrentBalance
ProviderId, CurrencyCode, LastUpdatedUtc
6. Governance & Determinism
- Freshness guard:
- Replay integrity:
- Reservation hygiene:
If LastUpdatedUtc is stale, apply safe-side restrictions to avoid uncertain spending decisions.
Snapshot runtime credit state for explainable deterministic replay audits.
Settle/release ReservedBalance promptly after completion to avoid resource deadlocks.
Changelog
- v0.0.0 / v0.0.0.0: Initial draft
- v0.0.1 (2026-05-06): Version upgrade aligned with documentation guidelines
architecture/interfaces/provider/IProviderCreditInfo.md