Skip to content

fix: route Databricks models through canonical protocols - #558

Merged
alongubkin merged 2 commits into
mainfrom
alon/alien-642-route-databricks-models-through-their-canonical-upstream
Sep 1, 2026
Merged

alongubkin merged 2 commits into
mainfrom
alon/alien-642-route-databricks-models-through-their-canonical-upstream

Conversation

@alongubkin

Copy link
Copy Markdown
Member

Summary

  • route each Databricks catalog model through its canonical upstream protocol and endpoint instead of mirroring the caller's public API
  • normalize request/response differences needed by real providers, including Databricks token limits, reasoning blocks, and named tool choice
  • add ignored live suites covering Chat Completions, Responses, Messages, tools/tool results, and streaming across direct providers and clouds
  • wire provider credentials into the credentialed test environment and exclude paid live binaries from ordinary CI

Real-provider verification

  • OpenAI: Chat, Responses, Messages, forced tool call + result, streaming
  • Anthropic: Messages, Chat, Responses, forced tool call + result, streaming
  • Databricks GPT-OSS: Chat, Responses with reasoning, Messages, forced tool call, streaming
  • Databricks Gemma model service: Chat, Responses, Messages
  • AWS Bedrock GPT-OSS: Chat, Responses, Messages with real SigV4
  • GCP Vertex Gemini: Chat, Responses, Messages
  • Azure Foundry Claude: Messages, Chat, Responses, streaming (quota-aware live harness)

Claude-specific Bedrock and Vertex tests remain ignored pending model access grants in the test accounts; the available model paths above were exercised successfully through the real Alien router.

Validation

  • cargo test -p alien-ai-gateway
  • cargo test -p alien-core (549 unit tests; doc tests green)
  • cargo clippy -p alien-ai-gateway -p alien-core --all-targets (green with existing warnings)
  • git diff --check
  • bash -n scripts/gen-env-test.sh
  • all live suites listed above

pnpm format-and-lint remains blocked by a pre-existing formatting error in examples/nextjs-app/next-env.d.ts; this PR does not modify that file.

Linear: ALIEN-642

@greptile-apps

greptile-apps Bot commented Sep 1, 2026 •

Copy link
Copy Markdown

Greptile Summary

The PR routes Databricks catalog models through their canonical upstream protocols and adds the request, response, tool-choice, reasoning, and streaming translations needed across supported providers.

  • Updates model catalog metadata and gateway route selection.
  • Extends cross-protocol normalization and provider-specific token handling.
  • Adds ignored live-provider coverage and excludes paid suites from ordinary CI.
  • Makes live-provider credentials optional during local environment generation while supplying them in credentialed workflows.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
crates/alien-ai-gateway/src/protocol.rs Extends cross-protocol request, response, tool-choice, reasoning-block, and streaming conversions.
crates/alien-ai-gateway/src/router/mod.rs Routes catalog models through their canonical upstream protocols and applies provider-specific request normalization.
crates/alien-core/src/ai_catalog.rs Updates canonical protocol and endpoint metadata for Databricks models.
scripts/gen-env-test.sh Emits optional live-provider credentials without blocking ordinary local environment generation.
.github/workflows/ci-fast.yml Excludes the new paid live suites from the ordinary hermetic test run.
.github/workflows/cloud-tests.yml Supplies live-provider credentials to the credentialed environment-generation job.
.github/workflows/e2e-cloud.yml Supplies live-provider credentials when generating cloud E2E environment artifacts.

Sequence Diagram

sequenceDiagram
    participant Client
    participant Gateway
    participant Catalog
    participant Provider
    Client->>Gateway: Request via Chat, Responses, or Messages
    Gateway->>Catalog: Resolve public model and canonical protocol
    Catalog-->>Gateway: Upstream model, endpoint, and protocol
    Gateway->>Gateway: Translate request when protocols differ
    Gateway->>Provider: Canonical provider request
    Provider-->>Gateway: Native response or stream
    Gateway->>Gateway: Translate to caller protocol
    Gateway-->>Client: Compatible response or stream
Loading

Reviews (2): Last reviewed commit: "fix: keep live provider credentials opti..." | Re-trigger Greptile

Comment thread scripts/gen-env-test.sh Outdated
@alongubkin
alongubkin merged commit 87f859e into main Sep 1, 2026
25 checks passed
@alongubkin
alongubkin deleted the alon/alien-642-route-databricks-models-through-their-canonical-upstream branch September 1, 2026 18: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.

1 participant