ai_gateway_model_services
Creates, updates, deletes, gets or lists an ai_gateway_model_services resource.
Overview
| Name | ai_gateway_model_services |
| Type | Resource |
| Id | databricks_workspace.catalog.ai_gateway_model_services |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
name | string | Resource name of the model service. Format: ``model-services/{catalog}.{schema}.{model_service}``. Each ``{...}`` component is capped at 255 characters individually. Server-derived on Create from ``parent`` + ``model_service_id``; required and immutable on Update/Get/Delete. |
metastore_id | string | Metastore hosting the model service. |
browse_only | boolean | Whether the caller sees only metadata available through the BROWSE privilege. |
comment | string | User-provided description. |
config | object | Operational configuration: destinations, routing, rate limits, inference table. Required on CreateModelService; on UpdateModelService it is required only when ``config`` (or a ``config.*`` subpath) appears in ``update_mask``. |
create_time | string (date-time) | When the model service was created. |
created_by | string | Creator identity. |
effective_owner | string | The resolved owner of the ModelService. Falls back to the caller's identity when ``owner`` is not explicitly set on creation. |
etag | string | Optimistic concurrency control token. Server-generated from the entity's state and returned on every read. To use it as an if-match precondition on a mutation, echo the last-read value back via the dedicated ``etag`` field on the Update / Delete request; the server rejects the mutation if the stored etag differs. |
owner | string | The owner of the model service. Write-only; read owner via effective_owner. |
supported_api_types | array | Unified API types this endpoint supports (e.g. "chat", "embeddings", "completions"). Derived from the destinations' backing models / providers at read time. |
update_time | string (date-time) | When the model service was last modified. |
updated_by | string | Identity of the last updater. |
| Name | Datatype | Description |
|---|---|---|
name | string | Resource name of the model service. Format: ``model-services/{catalog}.{schema}.{model_service}``. Each ``{...}`` component is capped at 255 characters individually. Server-derived on Create from ``parent`` + ``model_service_id``; required and immutable on Update/Get/Delete. |
metastore_id | string | Metastore hosting the model service. |
browse_only | boolean | Whether the caller sees only metadata available through the BROWSE privilege. |
comment | string | User-provided description. |
config | object | Operational configuration: destinations, routing, rate limits, inference table. Required on CreateModelService; on UpdateModelService it is required only when ``config`` (or a ``config.*`` subpath) appears in ``update_mask``. |
create_time | string (date-time) | When the model service was created. |
created_by | string | Creator identity. |
effective_owner | string | The resolved owner of the ModelService. Falls back to the caller's identity when ``owner`` is not explicitly set on creation. |
etag | string | Optimistic concurrency control token. Server-generated from the entity's state and returned on every read. To use it as an if-match precondition on a mutation, echo the last-read value back via the dedicated ``etag`` field on the Update / Delete request; the server rejects the mutation if the stored etag differs. |
owner | string | The owner of the model service. Write-only; read owner via effective_owner. |
supported_api_types | array | Unified API types this endpoint supports (e.g. "chat", "embeddings", "completions"). Derived from the destinations' backing models / providers at read time. |
update_time | string (date-time) | When the model service was last modified. |
updated_by | string | Identity of the last updater. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | name, deployment_name | include_browse | Returns the model service identified by its resource name. |
list | select | deployment_name | include_browse, page_size, page_token, parent, view | Lists the model services in a Unity Catalog schema. Provide parent as |
create | insert | parent, model_service_id, deployment_name, model_service | Creates a model service in a Unity Catalog schema. A model service is a governed AI Gateway endpoint | |
update | update | name, update_mask, deployment_name, model_service | etag | Updates a model service. Only the fields named in update_mask are changed; the resource name is |
delete | delete | name, deployment_name | etag | Deletes the model service identified by its resource name. Optionally supply an etag to make the |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
deployment_name | string | The Databricks Workspace Deployment Name (default: dbc-abcd0123-a1bc) |
model_service_id | string | Leaf identifier for the model service (the unqualified name within the parent schema, e.g. "my_model_service"). |
name | string | Resource name of the model service. Format: model-services/{catalog}.{schema}.{model_service}. Each {...} component is capped at 255 characters individually. |
parent | string | Resource name of the parent schema. Format: schemas/{catalog}.{schema}. Each {...} component is capped at 255 characters individually. |
update_mask | object | The list of fields to update. The framework validates each path against the model_service field above. Wildcard paths (paths: ["*"]) are not supported; list each field path explicitly. |
etag | string | If-match precondition: when set, the delete proceeds only if the current server-side etag matches. Empty means unconditional delete. |
include_browse | boolean | Whether to include model services for which the principal can only access selective metadata. |
page_size | integer | Maximum number of model services to return. Defaults to 100 when unset or 0; the maximum is 1000. Use next_page_token to retrieve additional pages. |
page_token | string | Opaque pagination token from a previous request. |
parent | string | Resource name of the parent schema to list within, as schemas/{catalog}.{schema}. Each {...} component is capped at 255 characters individually. |
view | string | View selector controlling which fields are populated per row. |
SELECT examples
- get
- list
Returns the model service identified by its resource name.
SELECT
name,
metastore_id,
browse_only,
comment,
config,
create_time,
created_by,
effective_owner,
etag,
owner,
supported_api_types,
update_time,
updated_by
FROM databricks_workspace.catalog.ai_gateway_model_services
WHERE name = '{{ name }}' -- required
AND deployment_name = '{{ deployment_name }}' -- required
AND include_browse = '{{ include_browse }}'
;
Lists the model services in a Unity Catalog schema. Provide parent as
SELECT
name,
metastore_id,
browse_only,
comment,
config,
create_time,
created_by,
effective_owner,
etag,
owner,
supported_api_types,
update_time,
updated_by
FROM databricks_workspace.catalog.ai_gateway_model_services
WHERE deployment_name = '{{ deployment_name }}' -- required
AND include_browse = '{{ include_browse }}'
AND page_size = '{{ page_size }}'
AND page_token = '{{ page_token }}'
AND parent = '{{ parent }}'
AND view = '{{ view }}'
;
INSERT examples
- create
- Manifest
Creates a model service in a Unity Catalog schema. A model service is a governed AI Gateway endpoint
INSERT INTO databricks_workspace.catalog.ai_gateway_model_services (
model_service,
parent,
model_service_id,
deployment_name
)
SELECT
'{{ model_service }}' /* required */,
'{{ parent }}',
'{{ model_service_id }}',
'{{ deployment_name }}'
RETURNING
name,
metastore_id,
browse_only,
comment,
config,
create_time,
created_by,
effective_owner,
etag,
owner,
supported_api_types,
update_time,
updated_by
;
# Description fields are for documentation purposes
- name: ai_gateway_model_services
props:
- name: parent
value: "{{ parent }}"
description: Required parameter for the ai_gateway_model_services resource.
- name: model_service_id
value: "{{ model_service_id }}"
description: Required parameter for the ai_gateway_model_services resource.
- name: deployment_name
value: "{{ deployment_name }}"
description: Required parameter for the ai_gateway_model_services resource.
- name: model_service
description: |
The model service to create. The server populates ``name`` from ``parent`` + ``model_service_id``; clients should leave it unset.
value:
browse_only: {{ browse_only }}
comment: "{{ comment }}"
config:
inference_table:
parent: "{{ parent }}"
disabled: {{ disabled }}
is_deleted: {{ is_deleted }}
table: "{{ table }}"
table_name_prefix: "{{ table_name_prefix }}"
rate_limits:
- key: "{{ key }}"
renewal_period: "{{ renewal_period }}"
principal: "{{ principal }}"
request_tag_key: "{{ request_tag_key }}"
request_tag_value: "{{ request_tag_value }}"
requests: {{ requests }}
tokens: {{ tokens }}
routing:
destinations:
- name: "{{ name }}"
destination_type: "{{ destination_type }}"
external_model_config:
model_provider_service: "{{ model_provider_service }}"
target: "{{ target }}"
is_deleted: {{ is_deleted }}
pay_per_token_config:
model: "{{ model }}"
provisioned_throughput_config:
model_serving_endpoint: "{{ model_serving_endpoint }}"
model: "{{ model }}"
traffic_percentage: {{ traffic_percentage }}
fallback:
destinations:
- name: "{{ name }}"
destination_type: "{{ destination_type }}"
external_model_config:
model_provider_service: "{{ model_provider_service }}"
target: "{{ target }}"
is_deleted: {{ is_deleted }}
pay_per_token_config:
model: "{{ model }}"
provisioned_throughput_config:
model_serving_endpoint: "{{ model_serving_endpoint }}"
model: "{{ model }}"
traffic_percentage: {{ traffic_percentage }}
first_token_timeout: "{{ first_token_timeout }}"
traffic_splitting: "{{ traffic_splitting }}"
create_time: "{{ create_time }}"
created_by: "{{ created_by }}"
effective_owner: "{{ effective_owner }}"
etag: "{{ etag }}"
metastore_id: "{{ metastore_id }}"
name: "{{ name }}"
owner: "{{ owner }}"
supported_api_types:
- "{{ supported_api_types }}"
update_time: "{{ update_time }}"
updated_by: "{{ updated_by }}"
UPDATE examples
- update
Updates a model service. Only the fields named in update_mask are changed; the resource name is
UPDATE databricks_workspace.catalog.ai_gateway_model_services
SET
model_service = '{{ model_service }}'
WHERE
name = '{{ name }}' --required
AND update_mask = '{{ update_mask }}' --required
AND deployment_name = '{{ deployment_name }}' --required
AND model_service = '{{ model_service }}' --required
AND etag = '{{ etag}}'
RETURNING
name,
metastore_id,
browse_only,
comment,
config,
create_time,
created_by,
effective_owner,
etag,
owner,
supported_api_types,
update_time,
updated_by;
DELETE examples
- delete
Deletes the model service identified by its resource name. Optionally supply an etag to make the
DELETE FROM databricks_workspace.catalog.ai_gateway_model_services
WHERE name = '{{ name }}' --required
AND deployment_name = '{{ deployment_name }}' --required
AND etag = '{{ etag }}'
;