{
  "id": 21158324,
  "title": "How BabySea built adaptive provider selection on Databricks",
  "url": "https://urgent.news/2026/11/22/how-babysea-built-adaptive-provider-selection-on-databricks",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-22T03:09:26.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/ariesrandy/how-babysea-built-adaptive-provider-selection-on-databricks-4g39"
  },
  "original_language": "en",
  "account": "BabySea, an execution control plane for generative media, offers one API across 80+ image and video models from 12+ AI labs, served by 8+ inference providers in three sovereign regions: US, EU, and APAC. The critical challenge lies not in exposing models, but in executing them optimally based on real-time latency, reliability, and cost conditions. To address this, BabySea utilizes Databricks, an intelligence layer that enables adaptive provider selection instead of static routing.\n\nCustomer executions generate attempt records, which first land in regional Supabase systems due to Postgres serving as the operational source of truth for the product. Databricks integrates directly with this data stream to form a continuous learning loop. The critical architectural decision is avoiding a separate analytics estate, instead embedding Databricks within the control loop to improve execution outcomes while maintaining operational safety.\n\nA common pitfall in \"smart routing\" systems is making the intelligence plane a dependency for serving traffic, leading to degradation when the ranking service fails. BabySea's design ensures Databricks computes rankings while the API consumes a cached export of that ranking, always retaining deterministic fallback behavior if Databricks or cache infrastructure fail. This design treats adaptive selection as an enhancement, never a dependency.\n\nThe runtime chain begins with customer traffic producing provider-attempt telemetry in regional Supabase. Databricks reads this telemetry and transforms it into provider-performance and provider-ranking artifacts, exporting these rankings to Upstash. The API reads the exported ranking for generation_provider_order, prioritizing \"fastest\" configuration while circuit-breaker logic and failover mechanisms remain in place. Later customer traffic feeds new telemetry, continuously improving the system.\n\nWhen a customer requests \"fastest,\" the API reads one Upstash Redis-protocol key, filters this ranking against providers configured for the requested model, and moves on. This hot path does not include Databricks SDK calls, MLflow clients, or Mosaic AI Model Serving fetches. All Databricks operations occur upstream of this line, ensuring the hot path is swift and efficient.\n\nBabySea's data strategy avoids copying operational data unless it's critical. Using Unity Catalog Lakehouse Federation, each regional Databricks workspace connects to its matching regional Supabase database via a PostgreSQL foreign connection. This approach provides a governed entry point into operational routing telemetry without introducing additional ETL systems or consistency problems. Data columns carry governed tags like gdpr_status, tenant_boundary, and ai_telemetry, ensuring the routing system reads multi-tenant, region-sensitive execution data that feeds training, ranking, analytics, and operational validation.\n\nRefining the data through a Lakeflow Spark Declarative Pipeline into a Bronze, Silver, Gold medallion on Delta Lake forms the core of BabySea's routing intelligence. Bronze lands federated operational tables into Delta-backed materialized views, isolating the product database from downstream transformations and establishing a Delta-native substrate for analytics, training, and export. Silver enriches provider attempts with routing-relevant fields and prepares data for ranking. Gold finalizes the ranking data for API consumption. This Medallion design ensures accurate, efficient, and governed routing intelligence, distinguishing BabySea's approach from generic analytics solutions.",
  "summary": "BabySea is the execution control plane for generative media: one API across 80+ image and video models from 12+ AI labs, served by 8+ inference providers, running in three sovereign regions: US, EU, and APAC. The hard problem is not exposing models. The hard problem is execution: deciding, per request, which provider should actually run a given model in a given region under real latency,…",
  "key_points": [
    "BabySea uses Databricks for adaptive provider selection, not static routing.",
    "Provider-attempt telemetry from Supabase feeds Databricks for performance and ranking.",
    "BabySea's design ensures Databricks is a performance enhancement, not a dependency."
  ],
  "editors_take": "Integrating Databricks directly into the control loop transforms real-time telemetry into actionable routing intelligence, allowing the platform to optimize model execution without making the intelligence layer a critical failure point.",
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}