Skip to content
Nizar Abubaker
Architecture

One door to every model: Xelverse AI gateway

Every platform in the group wanted AI features. Instead of each team holding its own provider keys and its own bill, they all go through one gateway that owns keys, budgets, routing and cost.

Client
Innovation Pulse
Role
Architect and builder
Year
2026 — Present
Industry
Technology
Status
Live
Endpoint
One, for every platform
Budgets
Per platform
Built in
Guardrails, prompt registry, RAG

01The challenge

Several platforms were adding AI features at once: drafting, matching, summaries. Left alone, each team would hold its own provider keys, pick its own models, run up its own bill and decide on its own what data may leave the building.

02The approach

One gateway that every platform calls instead of calling a model provider directly.

  • Platforms ask for a model alias, never a vendor model
  • Each platform has its own keys and budget, set from a manifest by a control-plane CLI
  • Guardrails and data classification decide what may leave
  • A prompt registry, evals, an audit log and a RAG service sit behind the same door
  • Every call is attributed to the platform that made it

03Architecture

Built on LiteLLM, PostgreSQL and Redis, behind Nginx on its own domain. Platform backends use a small TypeScript client or a NestJS module, so adding AI to a product is a dependency rather than a new integration. The RAG service runs on Fastify and PostgreSQL.

04My contribution

Designed the gateway and wrote the client, the NestJS module, the control plane, the guardrails, the prompt registry and the RAG service.

One gateway sits between every platform and every model

  1. Platforms

    • PaddleHub

    • Bdarbak

    • Other group apps

  2. AI Gateway

    • Routing by model alias

      LiteLLM maps each alias to a provider model

    • Keys and budgets

      per platform

    • Guardrails

      data classification

    • Prompt registry

      prompts and evals

  3. Supporting services

    • RAG service

      Fastify + PostgreSQL

    • Audit log

      cost per platform

    • Control-plane CLI

      turns manifests into keys and budgets

    • State

      PostgreSQL · Redis

  4. Model providers

    • Model providers

      reached only through the gateway

  • PaddleHubRouting by model alias
  • BdarbakRouting by model alias
  • Other group appsRouting by model alias
  • Routing by model aliasModel providers
  • Control-plane CLIKeys and budgets
Platforms call through a TypeScript client or NestJS module and never hold provider keys.

Outcome

Live on its own endpoint. PaddleHub and Bdarbak call it for their AI features instead of holding provider keys themselves.

Xelverse, the gateway's working name, as it appears on its console
Model aliases: each alias (fast-cheap, smart, arabic-dialect) maps to models from more than one provider, with per-token costs
The console: spend, requests, tokens and latency, and which aliases carry the traffic
Usage: daily spend by model, the cost attribution the gateway exists for