.NET API
ITenantProviderBindingStore
Tracon.Abstractions.dllThe store for per-tenant model provider bindings (BYOK).
public interface ITenantProviderBindingStoreRemarks
Section titled “Remarks”This store never writes or reads a secret value, only the name of the configuration key the value is read from at call time.
Provider names are matched case-insensitively. An
implementation must pass every provider name it writes, and every
provider name it is queried with, through
TenantProviderBinding.NormalizeProviderName. This is not a
convenience: the provider registry, the tenant egress policy and the admin
endpoint all match the name case-insensitively, so a case-sensitive store
turns a binding saved as "OpenAI" into a MISS for an agent whose
definition says "openai" — and a miss falls through to the global
setup credential silently, billing the wrong tenant with no error raised.
TenantProviderBindingStoreContract proves this for every
implementation.
An implementation is registered as a singleton and must be safe under concurrent calls from unrelated tenants.
Methods
Section titled “Methods”DeleteAsync(string, string, CancellationToken)
Section titled “ DeleteAsync(string, string, CancellationToken)”Deletes a tenant’s binding for a provider.
ValueTask<bool> DeleteAsync(string tenantId, string providerName, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”tenantId string
The tenant identifier.
providerName string
The provider name.
cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”true if a binding was found and deleted.
GetAsync(string, string, CancellationToken)
Section titled “ GetAsync(string, string, CancellationToken)”Reads a single tenant’s binding for a provider.
ValueTask<TenantProviderBinding?> GetAsync(string tenantId, string providerName, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”tenantId string
The tenant identifier.
providerName string
The provider name.
cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”ValueTask<TenantProviderBinding?>
The binding; null if none exists.
ListAsync(string, CancellationToken)
Section titled “ ListAsync(string, CancellationToken)”Lists every provider binding of a tenant.
ValueTask<IReadOnlyList<TenantProviderBinding>> ListAsync(string tenantId, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”tenantId string
The tenant identifier.
cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”ValueTask<IReadOnlyList<TenantProviderBinding>>
The bindings, by provider name.
UpsertAsync(TenantProviderBinding, CancellationToken)
Section titled “ UpsertAsync(TenantProviderBinding, CancellationToken)”Creates or replaces a tenant’s binding for a provider.
ValueTask UpsertAsync(TenantProviderBinding binding, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”binding TenantProviderBinding
The binding to save.
cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”The completion task.