Testing Databricks model serving endpoints with promptfoo

Point promptfoo at Databricks Foundation Model APIs and serving endpoints using exact endpoint names and workspace authentication. Learn what to configure, what to verify and where setups fail.

On this page

Testing Databricks model serving endpoints with promptfoo for evaluation and red teaming

Teams that serve models through Databricks need evals and red team runs they can repeat against those exact endpoints, not against a notebook demo. promptfoo's databricks provider sends chat requests through Databricks OpenAI-compatible Foundation Model APIs and supports pay-per-token, provisioned and external chat endpoints, each addressed by its exact serving endpoint name. That name, not a model family or marketing label, is what your suite should pin, because it is the object your application actually calls and the one whose configuration changes when someone updates the endpoint.

Promptfoo runs locally on the tester's machine. Evals and red team probes are generated and sent from that machine directly to the Databricks endpoint, so the traffic that reaches the model comes from your workstation or CI runner, not from a promptfoo cloud service. Decide where that runner sits relative to your workspace network controls, which credentials it holds and who can read its results. Confirm with your Databricks administrator which network paths and workspace permissions a runner needs to reach the serving endpoint, and whether any endpoint is restricted to specific service identities.

Authentication is the first thing to settle. Workspace authentication determines whose permissions the tests run under, and a red team run under a broadly privileged personal token tells you little about what a production caller can do. Use a dedicated service identity with query permission on only the endpoints under test, and store its token in your secrets manager or CI variables rather than in the config file. Check the provider page for the exact environment variables and config keys it expects, since those are the names your pipeline will need.

Before scaling up, run a small smoke suite against each endpoint type you plan to test. Confirm that a pay-per-token endpoint, a provisioned throughput endpoint and any external model endpoint each return a well-formed chat response, and record the exact endpoint name in the config so the result can be traced later. Pay-per-token and provisioned endpoints may differ in rate limits and cost per call, so plan the size of each red team scan against the endpoint you run it on, and confirm those limits with your workspace team before a full run.

Prerequisites for a Databricks endpoint under test

Five items need to be in place before promptfoo can call a Databricks serving endpoint. Each one is checked in a different place: your local machine, the Databricks workspace, and the identity your tests run as. Confirm all five before writing a configuration file, so a failed run points to one clear cause.

Node.js runtime version

The current promptfoo npm release, 0.124.1, requires Node.js 22.22.0 or newer. Check the version on every machine and CI runner that will execute evals, not only your workstation. An older runtime often fails during install or startup with errors that look unrelated to Databricks. Pin the Node.js version in your pipeline image so test results stay reproducible.

promptfoo on npm

A chat endpoint in the workspace

Promptfoo sends chat requests to an endpoint that already exists in your workspace. Identify whether it is pay-per-token, provisioned throughput, or an external model that Databricks routes to a third-party provider. Each type has different quotas, cost and data-handling terms, so record which type you are testing. A test run against an external endpoint sends prompts to that provider as well.

The exact serving endpoint name

Promptfoo addresses the endpoint by its serving endpoint name, not by the underlying foundation model name. Copy the name from the workspace's Serving page so that capitalization, hyphens and suffixes match exactly. A name that differs by one character typically returns a not-found error. Keep the name in a configuration value that you can change without editing test cases.

Workspace URL and credential

Collect the workspace URL and a credential that your promptfoo process can read from its environment. Ask your Databricks administrator which token type the organization issues for automated callers and how long it stays valid. Store the token in your secrets manager or CI variables, never in the configuration file committed to the repository. Confirm the token can query this endpoint and nothing beyond what the tests need.

Endpoint permissions and network path

The identity behind the token needs permission to query the specific serving endpoint. Ask your workspace administrator to confirm that grant, and to confirm whether the workspace is reachable from your runners or only through a private network path or IP allowlist. A permission gap and a blocked network path produce similar failures, so verify both before you debug the configuration. Record who approved the access for your audit trail.

How to configure the promptfoo Databricks provider step by step

This sequence takes you from a clean install to a single prompt sent to one Databricks serving endpoint and returned to your terminal. Each step ends with a check, so you know the connection works before you build larger eval suites or red team scans.

  1. Install promptfoo on the test machine

    Confirm that Node.js 22.22.0 or newer is installed on the machine or CI runner that will send requests to Databricks. Then install promptfoo from npm with npm install -g promptfoo, or run it with npx promptfoo if you prefer not to install it globally. The npm release 0.124.1 was published on 8 October 2026 and is the version you will see on the npm registry. This step is complete when promptfoo --version prints a version number.

  2. Collect workspace access details

    Ask your Databricks workspace administrator which authentication method your workspace uses for test traffic, and whether a service principal or a personal token is appropriate for this work. Record the workspace URL and the credential you will use. Confirm the exact environment variable names the provider reads in the promptfoo Databricks provider documentation before you set anything, since the names are not repeated in this guide. This step is complete when you have a written list of the values you need and who owns each one.

  3. Set workspace authentication environment variables

    Export the workspace URL and credential as environment variables in the shell that runs promptfoo, or add them as masked secrets in your CI system. Keep the values out of promptfooconfig.yaml and out of version control. Check that each variable is set without printing its value, for example with test -n "$VARIABLE_NAME" && echo set. This step is complete when every required variable reports as set in the shell where promptfoo will run.

  4. Confirm the exact serving endpoint name

    In the Databricks workspace, open the Serving section and find the chat endpoint you want to test. Note whether it is a pay-per-token Foundation Model API endpoint, a provisioned endpoint or an external endpoint, because the promptfoo provider supports all three for chat. Copy the endpoint name exactly, including capitalization, hyphens and underscores. This step is complete when the name you copied matches the name shown in the workspace list character for character.

  5. Reference the endpoint in the provider ID

    Create a promptfooconfig.yaml file and add a providers entry that uses the Databricks provider prefix followed by the exact endpoint name you copied. Check the provider ID format in the promptfoo Databricks documentation, because the prefix and separator must match what the provider expects. Keep the configuration to one provider and one prompt for this first test. This step is complete when the file parses without errors and the provider line contains the endpoint name you confirmed in the previous step.

  6. Run one test prompt and confirm the response

    Add a single test with a short, harmless prompt, then run promptfoo eval from the directory that holds the configuration. Open the results with promptfoo view or read the terminal summary. The run is successful when the response is non-empty and the provider line shows the endpoint name you referenced. If the run fails, check the authentication variables first, then the endpoint name and the endpoint type, since these three account for most first-run errors.

Choosing pay-per-token, provisioned or external endpoints for tests

The endpoint type you point promptfoo at determines how much test traffic you can send, how fast it runs and what it costs, so decide it before you write the first suite. The promptfoo Databricks provider sends chat requests through Databricks OpenAI-compatible Foundation Model APIs and supports three kinds of chat endpoint: pay-per-token, provisioned throughput and external endpoints. Each one shapes test design differently.

Pay-per-token endpoints are shared and billed by usage, so your practical limits are the rate limits and throughput that apply to your workspace. Large red team scans and high-concurrency eval runs can hit those limits and fail with throttling errors, so set conservative concurrency and retry settings for the first run and confirm the rate limits for your workspace before scaling up. Provisioned throughput endpoints run on capacity you have reserved, which suits steady, high-volume test schedules in CI, but the capacity must be sized in advance, so ask your Databricks account team how much throughput your planned suites need. External endpoints do not run a Databricks-hosted model at all. They proxy a model from another provider, so the test results depend on that provider's limits, pricing and data terms as well as on Databricks.

Confirm the endpoint type, its exact serving endpoint name and its limits with your Databricks account team before you commit a test budget or a CI schedule. Ask whether the endpoint is pay-per-token, provisioned or external, what rate limits and capacity apply, and who pays for test traffic when red team scans run at volume. Record the answers next to the promptfoo configuration so that a later change of endpoint type does not silently change the meaning of your pass rates.

Mapping Databricks endpoint names and workspace settings to promptfoo config

This table maps each Databricks item you need to point promptfoo at a serving endpoint to the place it goes in the promptfoo config. Read it as a checklist before the first run, and confirm exact config keys against the promptfoo Databricks provider documentation, since key names can change between releases.

Databricks itempromptfoo locationWhat to check
Serving endpoint nameProvider model reference in the config, using the exact endpoint nameCopy the name from the Databricks serving page. Endpoint names are case and character sensitive, and a near match fails at request time.
Workspace hostBase URL setting for the Databricks providerUse the workspace host for the region where the endpoint is deployed. Confirm the expected format in the provider documentation.
Access credentialEnvironment variable read by the provider, never a value written into the config fileUse a token scoped to the test workspace or a dedicated service principal. Confirm the variable name in the provider documentation.
Pay-per-token endpointTest plan with standard chat assertions and a modest request budgetConfirm the endpoint is available in your workspace and region. Per-token charges apply to every test call, so size the suite before a full run.
Provisioned throughput endpointTest plan with concurrency settings matched to the provisioned capacityConfirm the endpoint is in the ready state. Throttling on a provisioned endpoint shows up as failed or retried calls, not as model quality problems.
External model endpointTest plan that records the external provider behind the endpointConfirm the external credentials are configured in Databricks, not only in promptfoo, and that the upstream model is the one you intend to test.
Judge or grader modelSeparate grader provider entry, pointed at an endpoint your data rules allowKeep grader and target settings apart so a grading call never silently uses the endpoint under test.

Securing workspace credentials and test data

Testing a Databricks endpoint puts a workspace credential in a config file and sends prompts and responses through a tool that writes results to disk. Both need deliberate handling before the first run. The cards below cover where tokens live, which identity makes the calls, and who can read what promptfoo records.

Keep workspace tokens out of config files

Read the Databricks token from an environment variable or a CI secret store rather than writing it into promptfooconfig.yaml or committing it to the repository. Check that CI logs do not echo the variable and that local .env files are excluded from version control. Confirm who can read the secret store in your pipeline, because anyone who can edit a pipeline job may be able to print it.

Use a dedicated service identity

Create a separate Databricks service principal or user for test traffic, rather than reusing a person's token or a production application identity. This keeps test calls distinguishable in workspace audit records and lets you rotate or revoke the test credential without affecting anyone else. Ask your Databricks administrator how token lifetime and rotation are set for that identity in your workspace.

Limit the identity to the endpoints under test

Grant the test identity query access only to the serving endpoints named in the promptfoo configuration, not to the whole workspace or to model registry and admin functions. A red team run sends many adversarial prompts, so a narrow grant limits the damage if the token leaks. Verify the permission by attempting a call to an endpoint outside the list and confirming it is refused.

Decide where promptfoo output is stored

Eval results and red team reports contain the full prompts and model responses, which may include customer records, internal documents or generated personal data. Decide whether results stay on the runner, go to an approved artifact store, or are kept in a self-hosted promptfoo instance. Set a retention period for those artifacts and delete them on a schedule rather than letting them accumulate in CI storage.

Control who can read test results

Treat promptfoo output files and web views as sensitive records. Restrict read access to the team that owns the endpoint and the people who review findings, and check that CI artifact visibility settings do not expose results to every project member. Single-user local results are simpler to control, but shared dashboards need access rules set before anyone is invited.

Confirm what the Databricks logs record

Before sending sensitive test data, confirm with your Databricks administrator which request and response details are written to workspace audit logs or inference tables for the endpoints you test. Logging policy determines whether adversarial prompts become a second copy of sensitive content. Record the answer in your test plan so the team knows where each prompt ends up.

How a promptfoo test reaches a Databricks serving endpoint

The flow starts on the tester's machine or CI runner, where promptfoo loads the configuration and builds each test request. The runner sends OpenAI-compatible chat requests across the trust boundary to the Databricks workspace, carrying the workspace credential. The workspace routes each request to the named serving endpoint, whether pay-per-token, provisioned or external, and the response travels back to promptfoo for grading. Check that the credential stays on the runner, and that the endpoint name in the configuration matches the serving endpoint exactly.

Requests and responses crossing the boundary between the runner and the Databricks workspace.

Why Databricks endpoint calls fail in promptfoo

This table lists the failures teams most often hit when promptfoo calls a Databricks serving endpoint, with the likely cause and one fix for each. Use it as a first check when a run fails before any test result is produced. Error text varies by workspace and version, so confirm the exact message in your own environment before acting on a fix.

FailureLikely causeFix to try first
Endpoint not foundThe endpoint name is misspelled, uses the display label instead of the serving endpoint name, or belongs to another workspace.Copy the exact serving endpoint name from the Databricks Serving page of the target workspace and paste it into the provider configuration.
Wrong endpoint typeThe endpoint is an agent, custom model or other type that does not expose the chat interface promptfoo expects.Confirm the endpoint is a pay-per-token, provisioned throughput or external chat endpoint, then retry the same name.
Authentication rejectedThe token is expired, revoked, copied with extra whitespace, or read from a different environment variable than intended.Generate a new personal access token or service principal token, store it in the variable the config reads, and confirm it with a single request outside promptfoo.
Workspace URL mismatchThe host points to a different workspace, a regional domain, or a URL with a path suffix, so the token and endpoint do not match.Set the workspace host to the base URL shown in your browser for the workspace that owns the endpoint, without a trailing path.
Insufficient permissionsThe identity can authenticate but lacks the Can Query permission on the serving endpoint.Ask a workspace administrator to grant query access on that endpoint to the user or service principal running the eval.
Throttling or rate limitsPay-per-token or provisioned capacity rejects requests when concurrency or token volume exceeds what the endpoint allows.Lower promptfoo concurrency and add retry delays, then check the endpoint's limits and capacity settings in the workspace.
Model output unexpectedThe endpoint returns a response shape or content type that the assertions were not written for, such as an external model behind a different schema.Run one test case manually, inspect the raw response, and adjust the assertion or transform to match what the endpoint returns.

Questions buyers ask before testing Databricks endpoints

How much effort does connecting promptfoo to Databricks take for an internal team?

For a team already comfortable with Node.js and Databricks, the core connection is a configuration task: install promptfoo, set up workspace authentication, and point a provider entry at each serving endpoint. The promptfoo Databricks provider sends chat requests through Databricks OpenAI-compatible Foundation Model APIs and supports pay-per-token, provisioned and external chat endpoints, using the exact serving endpoint name. The effort grows with the number of endpoints, the number of identities, and how much of the work is building red team and eval suites rather than wiring the provider. Promptfoo's npm release 0.124.1 requires Node.js 22.22.0 or newer, so confirm that runtime on the machines or CI runners that will run tests. Plan for a short learning curve on promptfoo's config format and on how your workspace handles serving endpoint access.

What drives the cost of outside help for this integration?

Outside help is billed for the work in the written scope, not for the tool itself, since promptfoo is MIT-licensed open source. The main cost drivers are the number of endpoints and model types (pay-per-token, provisioned and external), the complexity of workspace authentication and how identities are issued, whether tests run in CI/CD, and how much evaluation and red teaming content must be designed. Ongoing items include maintaining configurations when endpoint names change and re-running tests after model or workspace changes. Ask any provider for a quote that lists each endpoint, the identity model, the test suites in scope, the deliverables, and whether retesting or support is included. A fixed-scope quote, agreed in writing before work starts, makes these assumptions visible.

How long does a first working configuration usually take?

The answer depends on endpoint count and identity setup more than on promptfoo itself. A single endpoint with an identity already available in the workspace is the simplest case. Each additional endpoint adds a provider entry, a check that the exact serving endpoint name matches what Databricks shows, and a test run to confirm responses. Identity setup can take the longest when service principals, token issuance or network access must be approved by another team. Ask the provider for a timeline that separates identity setup, first connection, and suite build-out, and that states which of those depend on your workspace administrators. DeployOpen does not publish fixed durations, so the written scope is the source for any timeline.

What does the work need from our side?

Expect to provide four things: access to the Databricks workspace where the serving endpoints live, the exact serving endpoint names for each pay-per-token, provisioned or external chat endpoint in scope, a dedicated test identity with only the permissions needed to query those endpoints, and a named engineer who can approve the test traffic and its cost. Also confirm which environment will run the tests, whether that is a laptop, a CI runner or a shared host, and that it runs Node.js 22.22.0 or newer. Ask whether test traffic will count against provisioned capacity or external provider quotas, and who owns those limits. Missing any of these items usually extends the first configuration phase.

Can our team set this up without outside help?

Yes, a team with Databricks administration skills and some experience with CLI tools and CI can usually set up a first working provider configuration on its own, because the promptfoo Databricks provider follows the OpenAI-compatible request pattern and uses the endpoint name directly. Outside help tends to add value where the team lacks time or experience with red teaming, where identity and network controls need design review, or where evaluation suites must be built to catch regressions and meet internal evidence requirements. A practical approach is to do the first connection in-house, then decide which parts to outsource based on what the team has not yet built. Ask any partner to scope the handover, including documentation and the configuration files you keep.

Which identity and access questions should we answer before starting?

Before any test runs, decide which identity will call each endpoint, what permissions it holds, and where its credentials are stored. Keep test identities separate from production applications so that test traffic is visible in logs and can be revoked without affecting users. Confirm which endpoints the identity may query, whether external endpoints need additional keys held by the workspace, and how credentials reach CI runners without being committed to repositories. Your security team will likely want these answers documented before approving the setup. Confirm the exact behavior of workspace authentication with your Databricks administrators, since the requirements depend on your workspace configuration.

What should we check after the first connection works?

A successful response does not prove the test is meaningful. After the first connection, confirm that each endpoint name returns the expected model behavior, that errors from unavailable or throttled endpoints are reported clearly, and that red team and eval results can be reviewed by the people who own the application. Check that test traffic appears in the Databricks serving logs under the test identity, and that cost or quota usage matches expectations. Record the promptfoo version you tested with, since the npm release 0.124.1 and the Node.js requirement may change over time. Treat the first run as a baseline for future regression checks.

Scaling Databricks red team runs beyond a single developer

A promptfoo run against a Databricks serving endpoint starts on a laptop, but a red team program needs runs that anyone on the team can repeat, compare and audit. The first step is to move the configuration out of an individual's working directory: keep the provider block, the endpoint names and the red team settings in a shared repository, with the workspace host and token supplied through environment variables from your secrets store rather than written into the file. Once the config is shared, pin the promptfoo version so that a result from last month can be reproduced, and confirm the Node.js requirement for that version on every runner. The same config then drives scheduled or pull-request runs in CI, where the token belongs to a dedicated service identity with access only to the endpoints under test.

Running promptfoo in CI covers the execution path, but a single self-hosted promptfoo server is a different question. The self-hosted app is an Express server that stores data in a local SQLite database. That database cannot be shared across replicas, and the self-hosted deployment has no RBAC, horizontal scaling, built-in authentication or SSO. The documentation does not recommend it for production use, so a shared results view for a team should be treated as a pilot, not a control. Before you rely on it, confirm with the promptfoo documentation which features your version supports and who can reach the server. If your organization needs team sharing, access control by team, SSO and continuous monitoring, promptfoo Enterprise lists those features at custom pricing, and promptfoo On-Premise runs the same functionality inside your own infrastructure with a dedicated deployment engineer. Ask for a written quote tied to your number of users, runners and deployment location, and confirm how the Enterprise features map to your identity provider.

How DeployOpen scopes and delivers Databricks endpoint testing

DeployOpen approaches promptfoo against Databricks serving endpoints as a written, fixed-scope piece of work. We agree which endpoints, workspace authentication method and test suites are in scope, then build a working configuration in your environment and hand it over with documentation your team can run without us.

How we scope

  • Inventory the Databricks endpoints to test and record each exact serving endpoint name.
  • Classify each endpoint as pay-per-token, provisioned or external so the provider settings match.
  • Agree which workspaces, credential sources and CI runners are covered by the written scope.

How we build

  • Configure the promptfoo Databricks provider with workspace authentication suited to your security policy.
  • Write eval suites and red team configurations that target each agreed endpoint by its exact name.
  • Test the configuration against each endpoint and record failures, rate limit behavior and grading results.

How we hand over

  • Deliver the configuration files, endpoint mapping and authentication setup in your own repository.
  • Document how to add a new serving endpoint and how to rotate workspace credentials safely.
  • Walk your engineers through running evals and reading results before the engagement closes.

How we support

  • Ongoing support, upgrades of promptfoo and continuous testing are available as a retainer.
  • Retainers can cover re-running suites when endpoints change, such as a new model version or an endpoint rename.
  • Confirm support terms, response expectations and what is included in your written scope before work starts.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.