yera.providers.credentials
Resolve API-key credentials for model provider connections.
Symbols
provider_api_key_identity
provider_api_key_identity(
secret_id: str,
) → SecretIdentityBuild the secret-store identity for a provider API key.
Parameters
secret_id
type: str
Stable opaque owner identity stored in provider config.
Returns
type: SecretIdentity
Identity of the API key in Yera's protected secret store.
ProviderCredentialError
Inherits:
ValueErrorAn API-key provider credential could not be resolved safely.
resolve_provider_api_key
resolve_provider_api_key(
connection: APIKeyConnection,
secret_store: SecretStore | None = None,
) → strResolve the API key referenced by a provider connection.
Parameters
connection
type: APIKeyConnection
API-key provider connection to resolve.
secret_store
type: SecretStore | None = None
Optional store override used for stored references.
Returns
type: str
Resolved API-key value.
Raises
ProviderCredentialError
If the referenced credential is missing, inaccessible, empty, or not valid UTF-8.