[FEATURE] Native Databricks provider for Databricks Unity Gateway model services

未关闭
#9,745 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@prasadkona 已经在做这个了。

开始于 2026年11月25日。

  • #9746 来自 @prasadkona —— 未关闭

评估

难度
5/5
预计耗时
一周以上
新手友好度
12/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
python
领域
ai, api

调研方向

The request asks for a new native databricks provider in the LLM layer, built on subclasses of the existing OpenAI, Anthropic and Gemini providers, plus a databricks extra and an opt-in allow_upload switch in crewai-files. Start by reading how SnowflakeCompletion is structured and how is_litellm routing selects a provider. Done means the routing rules and auth behaviour are settled in review, and PR #9746 is accepted, since it already covers this work.

由索引模型根据 Issue 内容生成。

描述

Feature Area

Integration with external tools

Is your feature request related to a an existing bug? Please link it here.

NA

Describe the solution you'd like

A native databricks LLM provider, so LLM(model="databricks/<model-service>") calls models through Databricks Unity Gateway. Databricks Unity Gateway is the recommended way to access models on Databricks. Model services are either Databricks-provided (system.ai.<model>) or configured in Unity Catalog (<catalog>.<schema>.<service>).

Today databricks/... goes through LiteLLM, or through the OpenAI provider with a base_url and a hand-minted token. Neither supports OAuth with token refresh, and model-specific behaviour (for example, models that reject temperature) is left to each user.

What the provider would do:

  • Auth: Databricks unified auth through databricks-sdk (PAT, OAuth M2M, OAuth U2M / CLI profiles), with a fresh token on every request, so long-running crews don't expire.
  • Routing: each model service goes to the right API, chosen by its name or by api=, with no network lookups:
    • Claude goes to the native Anthropic Messages API.
    • Gemini goes to the native Gemini API, which keeps multi-turn tool calls working.
    • Every other model goes to the unified Responses API, or to Chat Completions with api="completions".
  • Reuse: the classes subclass crewAI's existing OpenAI, Anthropic and Gemini providers, the same pattern as SnowflakeCompletion. Tools, streaming, structured output, files and usage come from those classes.
  • No I/O at construction, a databricks extra, CLI picker entries, and docs in en, ar, ko and pt-BR.
Describe alternatives you've considered
  • Keep using LiteLLM's databricks/ route. It works for chat, but auth, refresh and model quirks stay outside crewAI, and native Anthropic/Gemini features aren't available.
  • Use the OpenAI provider with base_url. This only supports a static token (no refresh), and every model is forced onto one OpenAI-shaped API.
Additional context

Design points we'd like feedback on before review:

  • databricks/ names would use the native provider. Previously they fell back to LiteLLM; is_litellm=True keeps the old route.
  • The databricks extra bundles databricks-sdk, plus the anthropic and google-genai SDKs (already crewAI extras) for the native Claude and Gemini APIs.
  • The provider's own Databricks requests carry a crewai_oss/<version> User-Agent. Other providers and the host application's SDK clients are untouched.
  • Files are always sent inline: Databricks Unity Gateway serves no vendor Files API. This needs a small opt-in allow_upload switch in crewai-files.

An implementation is ready on a fork: prasadkona/crewAI @ feat/databricks-provider.

  • It has 159 unit tests (mocked, no network), and mypy and ruff are clean.
  • The existing test suites give the same results as main.
  • It was verified end to end against a Databricks workspace, including a crew deployed as a Databricks App.
Willingness to Contribute

Yes, I'd be happy to submit a pull request

主要语言
Python
星标
61.2k
派生
9.2k
平均合并
1 天 14 小时
30 天内合并 PR
180

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

crewAIInc/crewAI 的其他 Issue

查看 crewAIInc/crewAI 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。