Automatically Route Every Task to the Right Model with Unity Gateway

Databricks Guide Today

Description

Databricks Unity Gateway puts every model behind one governed gateway, and Smart Routing picks the lowest-cost model that can handle each task before your coding agent starts. Small edits go to fast, low-cost models, risky production changes go to frontier models, and nobody has to pick a model by hand.

⏰ Chapters
00:00 - Unity Gateway, Model Choice and Smart Routing Explained
00:54 - AI Spend and a Governed Model with Fallback and Rate Limits
02:02 - MCP Tools, the ug CLI and Agent Configuration
03:07 - Approved Models in Codex and Claude Code
03:50 - Smart Routing in Action: Small Edit vs Production Change
04:48 - Where the Money Goes: Coding Agent Spend in Genie Code

🧭 How Smart Routing works
Unity Gateway, formerly Unity AI Gateway, serves frontier models like GPT and Claude next to open-weight models like Kimi K3 and GLM 5.3, so the router has real choice. Before the agent starts, the router reads the task, picks the lowest-cost model that can handle it, and shows its reasoning. If a model returns errors or hits limits, requests fall back to another model automatically, with no code changes. Every model service lives in Unity Catalog, so it gets the same permissions and lineage as your data.

🛠️ What you'll see in the demo
• Reviewing AI spend in the AI Gateway usage dashboard, where one frontier model, Claude Opus 5.5, takes the biggest share
• Creating a model service in Unity Catalog with a 50/50 traffic split between Kimi K3 and GPT-6 Astra, and Claude Opus 5.5 as the fallback
• Setting rate limits of 100 requests and 100,000 tokens per minute for the service, and 20 requests and 20,000 tokens per user
• Governing the MCP tools agents can call, like Genie, GitHub, Atlassian, and Slack
• Connecting Claude Code, Codex, Gemini, Copilot, OpenCode, and Pi with the Unity Gateway CLI (ug), and setting each agent's models, Smart Routing, and budget-based smart defaults in Agent Configuration
• Working with only the models the admin approved in Codex and Claude Code, including open-weight Kimi K3 and GLM 5.3
• Watching Smart Routing send a one-line edit to GPT-6 Luna and a zero-downtime production migration to GPT-6.1 Sol
• Asking Genie Code where the money went: Claude Opus 5.5 cost an estimated $133, about 3x Claude Haiku 4.5 for the same token volume, while open-weight models came to under $2

Whether you're a platform team rolling out coding agents, an engineering leader watching the AI bill, or a developer who wants the right model without choosing one for every task, Unity Gateway gives you model choice, governance, and cost control in one place.

🔗 Resources
📘 Unity Gateway documentation: https://docs.databricks.com/aws/en/unity-gateway
🤖 Get started with coding agents: https://docs.databricks.com/aws/en/ai-gateway/coding-agent-integration
📂 Unity Gateway CLI (ug) on GitHub: https://github.com/databricks/unity-gateway
🚀 Databricks Unity Gateway: https://www.databricks.com/product/artificial-intelligence/ai-gateway

🤝 Stay connected
Website: https://databricks.com
Twitter: https://x.com/databricks/
LinkedIn: https://www.linkedin.com/company/databricks/
Instagram: https://www.instagram.com/databricksinc/
Facebook: https://www.facebook.com/databricksinc/