Overview
The Databricks provider connects to models hosted on Databricks AI Gateway, including Claude models and Meta Llama models. It supports both token-based and OAuth authentication. Source:crates/goose/src/providers/databricks.rs
Configuration
Environment Variables
string
required
Your Databricks workspace URL (e.g.,
https://your-workspace.cloud.databricks.com)string
Personal access token (optional if using OAuth)
number
default:"3"
Maximum number of retry attempts
number
default:"1000"
Initial retry interval in milliseconds
number
default:"2.0"
Multiplier for exponential backoff
number
default:"60000"
Maximum retry interval in milliseconds
Setup
Authentication
The provider supports two authentication methods:1. Token Authentication
Use a personal access token:2. OAuth Authentication
If no token is provided, the provider automatically uses OAuth device code flow:- Displays a device code and URL
- Opens your browser to authenticate
- Caches the OAuth token for future use
- Automatically refreshes expired tokens
- Client ID:
databricks-cli - Redirect URL:
http://localhost - Scopes:
all-apis,offline_access
Supported Models
Claude Models
databricks-claude-sonnet-4(default) - Claude Sonnet on Databricksdatabricks-claude-sonnet-4-5- Latest Sonnetdatabricks-claude-haiku-4-5(fast model) - Fast Claude model
Meta Llama Models
databricks-meta-llama-3-3-70b-instruct- Llama 3.3 70Bdatabricks-meta-llama-3-1-405b-instruct- Llama 3.1 405B
Usage
Basic Usage
Custom Configuration
Using Fast Models
Advanced Features
Embeddings
The Databricks provider supports text embeddings:serving-endpoints/text-embedding-3-small/invocations
Retry Configuration
Configure retry behavior:- Max retries: 0 (fail fast)
- No exponential backoff
Model Endpoints
The provider automatically routes to the correct endpoint:Implementation Details
Provider Metadata
Authentication Flow
API Format
Requests use OpenAI-compatible format but without themodel field:
Retry Strategy
Fetching Available Models
Error Handling
Programmatic Configuration
OAuth Token Management
Tokens are cached in the system keyring:- Service:
databricks_oauth - Account:
{host}_access_tokenand{host}_refresh_token