Universal.Databricks.Client
1.0.0
See the version list below for details.
dotnet add package Universal.Databricks.Client --version 1.0.0
NuGet\Install-Package Universal.Databricks.Client -Version 1.0.0
<PackageReference Include="Universal.Databricks.Client" Version="1.0.0" />
<PackageVersion Include="Universal.Databricks.Client" Version="1.0.0" />
<PackageReference Include="Universal.Databricks.Client" />
paket add Universal.Databricks.Client --version 1.0.0
#r "nuget: Universal.Databricks.Client, 1.0.0"
#:package Universal.Databricks.Client@1.0.0
#addin nuget:?package=Universal.Databricks.Client&version=1.0.0
#tool nuget:?package=Universal.Databricks.Client&version=1.0.0
About
Universal.Databricks.Client calls Databricks workspace APIs from .NET. DatabricksClient holds the workspace URL and credentials. Its AIGateway property exposes the Unity Gateway, with one client for each gateway API:
AIGateway property |
Gateway path | Models |
|---|---|---|
Mlflow |
/ai-gateway/mlflow/v1 |
Every chat model service, through Chat Completions and Responses |
NativeOpenAI |
/ai-gateway/openai/v1 |
GPT model services, through Responses |
NativeAnthropic |
/ai-gateway/anthropic/v1 |
Claude model services, through Messages |
NativeGemini |
/ai-gateway/gemini/v1beta |
Gemini model services, through generateContent |
The request and response types follow the shapes of Universal.OpenAI.Client, Universal.Anthropic.Client, and Universal.Google.Gemini.Client under Universal.Databricks.Client.AIGateway.OpenAI, .AIGateway.Anthropic, and .AIGateway.Google.Gemini.
Quick start
using Universal.Databricks.Client;
using Universal.Databricks.Client.AIGateway.OpenAI.V1.Chat;
using var databricks = new DatabricksClient(
"https://dbc-1234abcd-5678.cloud.databricks.com",
Environment.GetEnvironmentVariable("DATABRICKS_TOKEN"));
CreateCompletionResponse response = await databricks.AIGateway.Mlflow.Chat.CreateCompletionAsync(new CreateCompletionRequest
{
Model = "system.ai.claude-sonnet-4-5",
MaxTokens = 256,
Messages = [new UserMessage("What is Databricks?")],
});
Model services use fully qualified Unity Catalog names, such as system.ai.claude-sonnet-4-5.
Authentication
Pass a personal access token, or a token provider that returns a current bearer token. For a service principal, use OAuth machine-to-machine:
using var databricks = DatabricksClient.FromServicePrincipal(host, clientId, clientSecret);
ServicePrincipalTokenProvider caches the token and renews it before it expires.
Errors
Failed calls throw DatabricksException. When the gateway relays an upstream provider error, Message contains the provider's message, and ProviderErrorType and Parameter are set when present. RetryAfter is set when a rate limit returns a Retry-After header.
Gateway behavior
- The
MlflowChat Completions API acceptsmax_tokens. Some models rejectmax_completion_tokens. - Claude reasoning appears as
reasoningcontent parts with a signature. Pass the assistant message back unchanged to keep reasoning across turns. - Gemini tool calls carry a
thoughtSignaturein Chat Completions and anencrypted_contentvalue on Responsesfunction_callitems. Send them back with the call. - Chat Completions usage includes cached tokens in
prompt_tokens; Claude also reportscache_read_input_tokensandcache_creation_input_tokens.
License
CC0-1.0.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Microsoft.Bcl.AsyncInterfaces (>= 10.0.14)
- Newtonsoft.Json (>= 13.0.4)
- Universal.Common.Json (>= 1.10.0)
- Universal.Common.Net.Http (>= 5.2.0)
- Universal.Common.Serialization (>= 2.4.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Universal.Databricks.Client:
| Package | Downloads |
|---|---|
|
Universal.Operative.Sdk.Discrete.Databricks
Databricks Unity Gateway adapters for Universal.Operative.Sdk.Discrete. |
|
|
Universal.Operative.Sdk.Databricks
REST-backed Databricks Genie tools for Operative, supporting multiple spaces and workspaces. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Initial release.