Back AI provider credentials with a Unity Catalog secret
Bind AI provider API keys and credentials to a Unity Catalog secret to rotate secrets without changing services.
O que mudou
Imagine you manage AI model services in Databricks and need to avoid static API keys in code. You can now associate a provider credential with a Unity Catalog-managed secret. The gateway reads the secret at query time, enabling key rotation without modifying the model service.
Use cases
- Store external provider API keys securely in Unity Catalog.
- Rotate keys without needing to update the AI model service.
- Avoid plaintext credentials in infrastructure definitions.
How to use
You can create the model provider service using the Python SDK to reference the secret.
from databricks.sdk.service import catalog as c
model_provider_service = w.ai_gateway.create_model_provider_service(
parent="schemas/main.default",
model_provider_service_id="my_provider",
model_provider_service=c.ModelProviderService(
comment="Routes to a custom OpenAI-compatible provider",
config=c.ModelProviderServiceConfig(
provider_type=(
c.ModelProviderServiceConfigExternalModelProviderType
.EXTERNAL_MODEL_PROVIDER_TYPE_CUSTOM
),
targets=[
c.ModelProviderServiceConfigModelTargetConfig(
model="gpt-4o",
native_api_types=["openai/v1/chat/completions"],
)
],
custom=c.ModelProviderServiceConfigCustomProviderConfig(
direct=c.ModelProviderServiceConfigCustomProviderDirectConfig(
base_url="https://api.example.com/v1",
api_key=c.ModelProviderServiceConfigProviderSecret(
plaintext="dummy-api-key"
),
)
),
),
),
)
What happens in this code:
- Imports the catalog modules from the Databricks SDK.
- Defines the identifier and parent schema where the service will be created.
- Configures the custom provider type and points to the target model.
- Sends the request to register the provider service in the catalog.
Limitations and requirements
- You must have
CREATE SERVICEon the target schema, plusUSE CATALOGandUSE SCHEMA. - To use Unity Catalog secrets, you must have
READ SECRETpermission on the specific secret.
- unity catalog
- ai gateway
- model serving
- security
Back model provider service credentials with a Unity Catalog secret
Resumo e explicação gerados por IA a partir da release note oficial. Em caso de dúvida, a documentação oficial da plataforma prevalece.
Relacionadas
- DatabricksGA
Repositórios de pacotes em nível de workspace para Databricks Apps
Administradores de workspace podem configurar repositórios padrão de pacotes Python e npm para Databricks Apps.
databricks apps · workspace settings - DatabricksGA
Redimensione partições de stateful streaming sem perder o checkpoint no Databricks
Agora é possível alterar o número de partições de shuffle em queries Structured Streaming e pipelines Lakeflow sem descartar o estado do checkpoint.
structured streaming · lakeflow - DatabricksAtualização
Google Gemini 4 Argon disponível no Unity Gateway do Databricks
O modelo multimodal Google Gemini 4 Argon já pode ser acessado via Foundation Model APIs e Unity Gateway.
unity catalog · foundation model apis