.NET API
TenantProviderBinding
Tracon.Abstractions.dllBinds a tenant to a model provider’s credential, by name only.
public sealed record TenantProviderBinding : IEquatable<TenantProviderBinding>Inheritance
Section titled “Inheritance”object ← TenantProviderBinding
Implements
Section titled “Implements”IEquatable<TenantProviderBinding>
Inherited Members
Section titled “Inherited Members”object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Remarks
Section titled “Remarks”This record carries no secret value, only the name of the configuration key the value is read from at call time. applies to this store the same way it applies to MCP server credentials: the database backup, the audit trail, and every HTTP response built from this type never carry a secret.
Constructors
Section titled “Constructors”TenantProviderBinding()
Section titled “ TenantProviderBinding()”public TenantProviderBinding()Properties
Section titled “Properties”ApiKeyConfigurationName
Section titled “ ApiKeyConfigurationName”Gets the configuration key name the credential value is read from. Never the value itself.
public required string ApiKeyConfigurationName { get; init; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”Must start with TraconTenantProviderOptions.AllowedConfigurationPrefix; resolution is rejected otherwise.
Endpoint
Section titled “ Endpoint”Gets the optional provider endpoint override for this tenant.
public string? Endpoint { get; init; }Property Value
Section titled “Property Value”ProviderName
Section titled “ ProviderName”Gets the provider name. Matches ModelBinding.Provider.
public required string ProviderName { get; init; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”Compared case-insensitively, like every other place a
provider name is matched (the provider registry, the tenant egress
policy, the admin endpoint). A store persists the value
TenantProviderBinding.NormalizeProviderName returns, so "OpenAI" and
"openai" are one binding and never two.
TenantId
Section titled “ TenantId”Gets the tenant this binding belongs to.
public required string TenantId { get; init; }Property Value
Section titled “Property Value”UpdatedAt
Section titled “ UpdatedAt”Gets the time this binding was last written.
public required DateTimeOffset UpdatedAt { get; init; }Property Value
Section titled “Property Value”Methods
Section titled “Methods”Equals(object?)
Section titled “ Equals(object?)”public override bool Equals(object? obj)Parameters
Section titled “Parameters”obj object?
Returns
Section titled “Returns”Equals(TenantProviderBinding?)
Section titled “ Equals(TenantProviderBinding?)”public bool Equals(TenantProviderBinding? other)Parameters
Section titled “Parameters”other TenantProviderBinding?
Returns
Section titled “Returns”GetHashCode()
Section titled “ GetHashCode()”public override int GetHashCode()Returns
Section titled “Returns”NormalizeProviderName(string)
Section titled “ NormalizeProviderName(string)”Returns the canonical form a store persists and looks a provider name up by.
public static string NormalizeProviderName(string providerName)Parameters
Section titled “Parameters”providerName string
The provider name as written by the caller.
Returns
Section titled “Returns”The canonical (invariant lower-case) form.
Remarks
Section titled “Remarks”An ITenantProviderBindingStore implementation must apply this to the name it writes and to the name it is queried with. A store that skips it is case-sensitive while the rest of the system is not, and a tenant whose binding was saved under a different letter case silently falls through to the global setup credential — the wrong tenant gets billed and no error is raised.
Normalizing the stored value (rather than comparing
case-insensitively at query time) is deliberate: a bare =
predicate then behaves identically on PostgreSQL, SQLite and SQL Server
whatever their collation, the primary key keeps rejecting duplicates on
all three, and the index stays usable.
Exceptions
Section titled “Exceptions”providerName is null or blank.
ToString()
Section titled “ ToString()”public override string ToString()Returns
Section titled “Returns”Operators
Section titled “Operators”operator ==(TenantProviderBinding?, TenantProviderBinding?)
Section titled “ operator ==(TenantProviderBinding?, TenantProviderBinding?)”public static bool operator ==(TenantProviderBinding? left, TenantProviderBinding? right)Parameters
Section titled “Parameters”left TenantProviderBinding?
right TenantProviderBinding?
Returns
Section titled “Returns”operator !=(TenantProviderBinding?, TenantProviderBinding?)
Section titled “ operator !=(TenantProviderBinding?, TenantProviderBinding?)”public static bool operator !=(TenantProviderBinding? left, TenantProviderBinding? right)Parameters
Section titled “Parameters”left TenantProviderBinding?
right TenantProviderBinding?