XRAPH/Work/AI gateway
Go · since 2026

Nexus

A gateway for LLM traffic that you compile into your own binary. Route across providers by cost, latency or priority; cache responses with optional semantic matching; redact PII and block prompt injection on the way through; enforce per-tenant budgets. It also exposes an OpenAI-compatible endpoint, so existing SDKs point at it unchanged.

Language
Go
Category
AI gateway
Since
2026
Stars
0
Repository Docs
01

Highlights

3 claims
H.01
Drop-in
OpenAI-compatible

Point an existing SDK at a Nexus instance and routing, caching, guardrails and tenancy come with it, without touching the calling code.

H.02
Threestrategies
Provider routing

Priority, cost-optimised and round-robin across OpenAI, Anthropic and anything speaking the same API.

H.03
Preandpost
Content guardrails

PII detection, prompt-injection checks and content filtering that can block, redact or warn on either side of the call.

02

What it does

6 entries

A gateway in front of the model providers, so the application stops caring which one answered.

02.1
Routing

Three strategies across providers

OpenAI, Anthropic or anything OpenAI-compatible, selected by priority, by cost or round-robin. The strategy is a configuration value.

Multi-provider
02.2
Guardrails

Block, redact or warn

PII detection, prompt-injection checks and content filtering run before and after the model call, with the action chosen per guard.

PIIInjection
02.3
Tenancy

Keys and limits per tenant

Every request carries its tenant, and API keys, rate limits, usage tracking and model aliases are all held per tenant.

Context-scoped
02.4
Storage

In-memory to Postgres

SQLite or Postgres in production, in-memory for development, with every subsystem behind a Go interface.

Pluggable
02.5
Aliases

Virtual model names

A name maps to a provider target, with input and output transforms, system prompt injection and RAG context applied on the way through.

Transforms
02.6
Compatibility

A drop-in proxy

The API surface matches OpenAI closely enough that an existing SDK needs its base URL changed and nothing else.

OpenAI API
03

Anatomy

4 modules
01

Routing

Multi-provider with aliases and fallbacks.

02

Guardrails

Checks applied before and after the model call.

03

Caching

Response reuse keyed on the full request.

04

Proxy

OpenAI-compatible surface so clients need no changes.

04

Why it exists

Design notes

#What it is

Nexus is an AI gateway you compile into your own binary. Route across providers, cache, guard and observe LLM traffic without running a separate SaaS in the path.

#What it does

  • Multi-provider routing to OpenAI, Anthropic or any OpenAI-compatible API, with priority, cost-optimised, round-robin and latency-based strategies.
  • Guardrails: PII detection, prompt injection blocking and content filtering, each with block, redact or warn actions.
  • Caching with deterministic keys and optional semantic matching, over memory or Redis.
  • Multi-tenant isolation: scoped requests, API keys, rate limits, usage tracking, budget enforcement and per-tenant model aliases.
  • Model aliases mapping a virtual name to a provider target, with per-tenant overrides and weighted routing, so "fast" can mean something different for each customer.
  • Transforms: system prompt injection, RAG context augmentation, anonymisation and output normalisation.
  • Streaming: reasoning deltas, tool-call streaming, multi-modal chunks, and four wire formats: OpenAI-envelope SSE, nexus-native SSE with named events, NDJSON, and a bidirectional WebSocket at /v1/realtime. Record-and-replay caching is idempotent across all of them.
  • OpenAI-compatible proxy, so existing SDKs point at your gateway unchanged.

#Why not a hosted gateway

Every hosted AI gateway puts a third party in the path of your prompts, which is a data-governance conversation before it is an architecture one. Nexus is fifteen lifecycle hooks and three storage backends in your own process. The trade is that you operate it, and you already operate the process it lives in.

05

Signals

GitHub
Stars
0
Language
Go
Since
2026
Adopters
00

Shipping something on Nexus? Nobody is listed here yet. Tell me what you built and you will be the first.

Get listed
06

Where it sits

Fields · papers