Add Databricks provider (AI Gateway / Foundation Model APIs)#1433
Draft
prasadkona wants to merge 3 commits intoanomalyco:devfrom
Draft
Add Databricks provider (AI Gateway / Foundation Model APIs)#1433prasadkona wants to merge 3 commits intoanomalyco:devfrom
prasadkona wants to merge 3 commits intoanomalyco:devfrom
Conversation
57fd9ae to
1f7590b
Compare
anthonyivn2
reviewed
Apr 14, 2026
bbqiu
reviewed
Apr 15, 2026
bbqiu
reviewed
Apr 15, 2026
bbqiu
reviewed
Apr 15, 2026
There was a problem hiding this comment.
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)
b2f1fc8 to
d73ee1d
Compare
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
d73ee1d to
7551543
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a Databricks catalog under
providers/databricks/for Foundation Model APIs exposed through Databricks AI Gateway: OpenAI-compatible chat/embeddings onmlflow/v1, plus per-model overrides for Anthropic Messages, GeminigenerateContent, and OpenAI Responses—all on the sameai_gateway_urlhost returned by workspace discovery.What's included
providers/databricks/—provider.toml,logo.svg, per-modelmodels/*.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 ownpackage.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-experimentalas devDependency (scripts only, not runtime).README.md— One-line pointer to the Databricks provider doc.packages/core/src/schema.ts—openAICompatiblePackagesSet (replaces||chain) to allow@databricks/ai-sdk-providerwhereapiis required.Validation / how reviewers can check
Optional (requires Databricks auth + workspace with AI Gateway routes):
Testing
bun validatepasses locallydatabricks:test-inferenceexercised against a workspace profile (37/37 gateway routes)Notes
@databricks/sdk-experimentallives inproviders/databricks/package.jsonas a devDependency — it is only used by the maintainer scripts and is not added topackages/core.