Skip to main content

Govern external model providers (model provider services)

External model providers let you bring your own key (BYOK): connect the LLM providers you already use, such as OpenAI, Anthropic, or Amazon Bedrock, and govern them through one control point. Register each provider once, and many users and model APIs route to it without ever handling the credentials.

On Databricks, an external model provider is a Unity Catalog securable object (a model provider service) that stores a provider's connection details and encrypted credentials. Because Unity Catalog stores providers, you govern access with the same privileges you use for data, query external models through Unity AI Gateway without exposing secrets, and track usage and cost from a single governance layer.

What is a model provider service?

A model provider service lives in a Unity Catalog catalog and schema and uses a three-part name, such as main.default.openai_prod. It holds:

  • The provider type (for example, OpenAI or Amazon Bedrock).
  • The connection configuration for that provider, such as an endpoint base URL or cloud region.
  • The provider credentials, which Databricks encrypts and stores. Databricks does not return credentials on read.

Because a model provider service is a Unity Catalog securable, you manage it the same way you manage other governed objects:

  • Grant and revoke access with Unity Catalog privileges.
  • Discover it in Catalog Explorer alongside your other data and AI assets.
  • Configure Unity AI Gateway features such as rate limits and inference tables on it.

Callers query a model provider service directly through Unity AI Gateway by referencing its name, and they don't see the stored credentials. A model provider service can also supply the external provider that a model service routes to, giving administrators a single, governed chokepoint for provider credentials.

Supported providers

A model provider service supports only the following external providers and authentication methods.

Provider

Authentication

OpenAI

API key

Azure OpenAI

API key, or Microsoft Entra ID Databricks service principal (tenant ID, client ID, and client secret)

Anthropic

API key

Amazon Bedrock

AWS access key pair (access key ID and secret access key)

Microsoft Foundry

API key, or Microsoft Entra ID Databricks service principal (tenant ID, client ID, and client secret)

Google Gemini Enterprise

API key, with GCP project ID and region

Custom

Bearer token, or an API key sent in an HTTP header you name, with an endpoint base URL

Provider

Authentication

OpenAI

API key

Azure OpenAI

API key, or Microsoft Entra ID Databricks service principal (tenant ID, client ID, and client secret)

Anthropic

API key

Amazon Bedrock

AWS access key pair (access key ID and secret access key)

Microsoft Foundry

API key, or Microsoft Entra ID Databricks service principal (tenant ID, client ID, and client secret)

Google Gemini Enterprise

API key, with GCP project ID and region

Custom

Bearer token, or an API key sent in an HTTP header you name, with an endpoint base URL

When a custom provider's endpoint expects its API key in a specific header rather than as a bearer token, you can name that header. See Send a custom provider API key in a header.

Why govern external providers in Unity Catalog?

Without a central registry, every team that uses an external model embeds its own provider credentials in application code or notebooks. Model provider services move that configuration into Unity Catalog so you can:

  • Define a provider once. Register the credentials and connection details in one place, then let many users and model services share it without ever handling the secret.
  • Govern access with Unity Catalog privileges. Use the same GRANT and REVOKE statements you use for other securables to govern who can query each provider.
  • Query across workspaces. A model provider service is available in any workspace that shares its metastore.
  • Track usage and cost. Unity AI Gateway records usage for queries that route through a model provider service. See Track model usage. Databricks also computes estimated spend for requests routed to external models. See External models.
  • Track lineage. See the model services that route to a provider and the downstream assets that consume its payloads. See Track model API and provider lineage.

Privileges

The following Unity Catalog privileges apply to model provider services. A principal also needs USE CATALOG and USE SCHEMA on the parent catalog and schema.

Privilege

Grants the ability to

CREATE SERVICE (on the schema)

Create a model provider service in the schema.

EXECUTE

Query the model provider service through Unity AI Gateway.

READ METADATA

View the model provider service and its configuration without querying it.

MANAGE

Edit, delete, and grant access to the model provider service.

Privilege

Grants the ability to

CREATE SERVICE (on the schema)

Create a model provider service in the schema.

EXECUTE

Query the model provider service through Unity AI Gateway.

READ METADATA

View the model provider service and its configuration without querying it.

MANAGE

Edit, delete, and grant access to the model provider service.

For how to grant and revoke these privileges, see Discover and govern access to external model providers (model provider services).

Limitations

Spend from model provider services is not tracked in budgets. Budget notifications, alerts, and hard spend caps do not apply to model provider service usage.

Next steps