Skip to content

Add Databricks provider (AI Gateway / Foundation Model APIs)#1433

Draft
prasadkona wants to merge 3 commits intoanomalyco:devfrom
prasadkona:add-databricks-ai-gateway-provider
Draft

Add Databricks provider (AI Gateway / Foundation Model APIs)#1433
prasadkona wants to merge 3 commits intoanomalyco:devfrom
prasadkona:add-databricks-ai-gateway-provider

Conversation

@prasadkona
Copy link
Copy Markdown

@prasadkona prasadkona commented Apr 13, 2026

Summary

Adds a Databricks catalog under providers/databricks/ for Foundation Model APIs exposed through Databricks AI Gateway: OpenAI-compatible chat/embeddings on mlflow/v1, plus per-model overrides for Anthropic Messages, Gemini generateContent, and OpenAI Responses—all on the same ai_gateway_url host returned by workspace discovery.

What's included

  • providers/databricks/provider.toml, logo.svg, per-model models/*.toml (capabilities, limits, costs where applicable, [provider] overrides for non-MLflow surfaces).
  • providers/databricks/README.md — Scope, discovery (GET /api/ai-gateway/v2/endpoints), HTTP layout, auth, eligibility rules, maintainer scripts.
  • providers/databricks/scripts/ — Databricks-specific scripts with their own package.json:
    • databricks-ai-gateway-shared.ts — Shared discovery + URL helpers; uses Zod for runtime validation of API responses.
    • list-databricks-ai-gateway.ts — List/filter gateway routes (discovery helper).
    • test-databricks.ts — E2E inference test against live gateway.
    • probe-databricks-capabilities.ts — Capability probe (tool-use, reasoning, image, PDF, temperature) across all 4 API surfaces.
  • providers/databricks/package.json@databricks/sdk-experimental as devDependency (scripts only, not runtime).
  • Root README.md — One-line pointer to the Databricks provider doc.
  • packages/core/src/schema.tsopenAICompatiblePackages Set (replaces || chain) to allow @databricks/ai-sdk-provider where api is required.

Validation / how reviewers can check

bun install
bun validate

Optional (requires Databricks auth + workspace with AI Gateway routes):

bun run databricks:list-gateway -- --profile <profile>
bun run databricks:test-inference -- --profile <profile>

Testing

  • bun validate passes locally
  • databricks:test-inference exercised against a workspace profile (37/37 gateway routes)

Notes

  • Catalog entries are metadata only; no secrets in-repo. Runtime clients must perform discovery and attach a Bearer token.
  • @databricks/sdk-experimental lives in providers/databricks/package.json as a devDependency — it is only used by the maintainer scripts and is not added to packages/core.

@prasadkona prasadkona force-pushed the add-databricks-ai-gateway-provider branch 2 times, most recently from 57fd9ae to 1f7590b Compare April 13, 2026 23:43
Copy link
Copy Markdown

@anthonyivn2 anthonyivn2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fields to review

Comment thread providers/databricks/models/databricks-claude-haiku-4-5.toml Outdated
Comment thread providers/databricks/models/databricks-gpt-5-4-nano.toml Outdated
Comment thread providers/databricks/models/databricks-gpt-5-4.toml Outdated
Comment thread providers/databricks/models/databricks-gpt-oss-120b.toml Outdated
Comment thread providers/databricks/models/databricks-qwen3-next-80b-a3b-instruct.toml Outdated
Comment thread providers/databricks/models/databricks-gpt-oss-120b.toml Outdated
Comment thread providers/databricks/models/databricks-gpt-oss-20b.toml
Comment thread bun.lock Outdated
Comment thread packages/core/package.json Outdated
Copy link
Copy Markdown

@bbqiu bbqiu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we're currently adding functionality in the wrong places -- granted I'm not very familiar with this codebase, but I don't think that we should be adding scripts / dependencies to the core package (and instead just be adding them to our databricks subfolder)

@prasadkona prasadkona force-pushed the add-databricks-ai-gateway-provider branch 3 times, most recently from b2f1fc8 to d73ee1d Compare April 21, 2026 03:07
Catalog providers/databricks for Foundation Model APIs on AI Gateway: default mlflow/v1 via @databricks/ai-sdk-provider; per-model overrides for Anthropic Messages, Gemini generateContent, and Openai Responses (codex). Schema allows @databricks/ai-sdk-provider where api is required. Adds discovery and HTTP E2E scripts, README, and root README pointer.
- Correct attachment flags: gpt-oss-120b, gpt-oss-20b, qwen3-next-80b set to false
  (gateway returns "Image input is not supported for this endpoint")
- Add pdf to modalities.input for all Gemini models and Codex models
  (confirmed via inlineData / Responses API input_file probes)
- Set temperature=false for all gpt-5* models (policy rule):
  base variants return HTTP 400 "Only the default (1) value is supported";
  all gpt-5* unified to false for catalog consistency
- Fix gpt-5-nano tool_call: true (false negative - now uses tool_choice:"required")
- Add reasoning=true for gpt-5-nano (reasoning_tokens confirmed in usage)
- Add reasoning=true for gemma-3-12b (<think> blocks confirmed via system prompt)
- Add probe script: packages/core/script/probe-databricks-capabilities.ts
  Tests tool-use, reasoning, image, PDF, and temperature across all 4 API surfaces
  (mlflow/v1 chat, Anthropic, Gemini, OpenAI Responses). Read-only diagnostic tool.
- Move Databricks scripts from packages/core/script/ to providers/databricks/scripts/
  with their own package.json; remove @databricks/sdk-experimental from packages/core
- Add Zod runtime validation to fetchFilteredGatewayRoutes (replaces unsafe cast)
- Replace isOpenAIcompatible boolean with openAICompatiblePackages Set in schema.ts
- Clarify provider.toml env comment with PAT vs OAuth M2M auth modes
- Shorten dense root README.md entry to a one-liner linking to provider README
- Add bun.lock to .gitignore
- Add databricks-claude-opus-4-7 model TOML
@prasadkona prasadkona force-pushed the add-databricks-ai-gateway-provider branch from d73ee1d to 7551543 Compare April 21, 2026 03:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants