Skip to main content

Adding Models

This section explains the steps to add Databricks models and configure the required access controls.
1

Navigate to Databricks Models in AI Gateway

From the TrueFoundry dashboard, navigate to AI Gateway > Models and select Databricks.
Navigating to Databricks Model Account in AI Gateway

Navigate to Databricks Models

2

Add Databricks Account and Authentication

Give a unique name for the Databricks account. This will be used to refer to the models later. Provide the authentication details for the AI Gateway to access your Databricks models. TrueFoundry supports both Service Principal and Personal Access Token (PAT) based authentication.
Using Service Principal (Recommended):Service Principal authentication is the recommended approach for production environments as it provides better security and access control.
  • Choose Service Principal Auth.
  • Enter your Databricks Service Principal Client ID and OAuth Secret.
Databricks Account Configuration Form with Service Principal Client ID and OAuth Secret Fields

Service Principal Authentication

Using Personal Access Token (PAT):Personal Access Tokens are suitable for development and testing environments.
  • Choose Databricks API Key Based Auth.
  • Enter your PAT.
Databricks Account Configuration Form with PAT Field

Personal Access Token (PAT) Authentication

Finally, enter your Databricks workspace URL (e.g., https://<workspace_id>.databricks.com).
3

Add Models

Click + Add Model to add a new model configuration. The Model ID in TrueFoundry must exactly match the serving endpoint name in your Databricks workspace.
  1. Access Databricks Serving: In your Databricks workspace, navigate to Serving in the left sidebar and click Create serving endpoint.
    Databricks workspace interface showing the Serving option in the left sidebar menu
  2. Configure Endpoint:
    • Endpoint name: Choose a descriptive name. This name will be your Model ID in TrueFoundry.
    • Served Entity: Choose from Foundation Models or your custom models.
    Databricks serving endpoint configuration form with fields for endpoint name and model selection
  3. Deploy and Verify: Click Create and wait for the deployment to become Ready.
Databricks model configuration form in TrueFoundry with display name and model ID fields

Add Databricks Model in TrueFoundry

Inference

After adding the models, you can perform inference using an OpenAI-compatible API via the Playground or by integrating it with your own application.
Code Snippet and Try in Playgroud Buttons for each model

Infer Model in Playground or Get Code Snippet

Responses API

Databricks serves the Responses API natively for its OpenAI foundation model endpoints — databricks-gpt-5, databricks-gpt-5-1, databricks-gpt-5-mini, and the rest of the databricks-gpt-5* family. The AI Gateway forwards these requests to Databricks unchanged, so you get back a real Responses object with a resp_ id, including the model’s reasoning output.
Python
Streaming works the same way — set stream=True and iterate over the emitted events.
Every other Databricks endpoint still accepts /responses, but the AI Gateway translates the request into a chat completion and converts the reply back. The response id tells you which path a request took: resp_ means it went to Databricks natively, chatcmpl- means it was translated. Reasoning output is not returned on the translated path.This is decided by the serving endpoint name, which is your Model ID in TrueFoundry. A GPT-5 model you deploy behind a custom endpoint name is treated like any other endpoint.
Databricks does not support server-side conversation state on pay-per-token endpoints. previous_response_id, store, and background are passed through to Databricks rather than dropped, so sending them returns an upstream 400 rather than silently losing your conversation history:
To hold a multi-turn conversation, send the full history in input on each turn.