Repository navigation
Description
Databricks client unified authentication is an established way for managing Databricks authentication that includes support for Databricks configuration profiles. Ellmer should support profiles defined in these config files. Currently, if I authenticate using the Databricks CLI (databricks auth login) and name the resulting profile DEFAULT, I get a ~/.databrickscfg file that contains:
[DEFAULT]
host = <DATABRICKS-HOST>
auth_type = databricks-cli
This profile can be correctly used by other tools that rely on Databricks client unified authentication (like the Databricks Python SDK). However, ellmer doesn't currently pick up on this file or the profiles defined and instead falls back on interactive browser authentication:
> chat <- ellmer::chat_databricks(model = "databricks-claude-3-7-sonnet")
Error in `databricks_workspace()`:
! Can't find env var `DATABRICKS_HOST`.
Show Traceback
This is a difference compared to chatlas, which "just works" with the defined DEFAULT profile:
>>> import chatlas
... chat = chatlas.ChatDatabricks(model = "databricks-claude-3-7-sonnet")
... chat.chat("Who are you?")
[05/21/25 09:51:13] INFO chatlas - Provider 'Databricks' generated a response of 101 tokens [_tokens.py](vscode-file://vscode-app/Applications/Positron.app/Contents/Resources/app/out/vs/code/electron-sandbox/workbench/workbench.html#):[30](vscode-file://vscode-app/Applications/Positron.app/Contents/Resources/app/out/vs/code/electron-sandbox/workbench/workbench.html#)
from an input of 11 tokens.
I'm Claude, an AI assistant created by Anthropic to be helpful, harmless, and honest. I can have
conversations, answer questions, assist with various tasks like writing and analysis, and generate different
kinds of content. I aim to be thoughtful, ethical, and provide balanced perspectives. I have certain
limitations - I don't have the ability to access the internet, run code, or interact with other systems unless
specifically enabled to do so. How can I help you today?
Activity
Pick up on workspace URLs set in the Databricks config file.
Pick up on workspace URLs set in the Databricks config file (#525)