Swap 2 lines in your standard OpenAI SDK. Intercept recursive runaway tool loops in 22.3 µs, stop token spend bleed with atomic micro-budgets, and failover upstream 504 timeouts with resilient socket recovery.
docker run -d -p 4000:4000 --name selixes-gateway ghcr.io/selixes/gateway:latest// 1. Install OpenAI SDK
npm install openai
// 2. Initialize SDK with Selixes Base URL
const openai = new OpenAI({
apiKey: process.env.SELIXES_API_KEY,
baseURL: 'http://localhost:4000/v1' // Route through gateway
});
// 3. Request completes with autonomic outage failovers and Continuity Mode!
const chat = await openai.chat.completions.create({
model: 'gpt-4o',
messages: [{ role: 'user', content: 'Analyze sales funnel...' }],
});
Drag the monthly transaction spend slider to estimate actual token fee cost arbitrage and protected loop spends.
Estimates based on typical usage patterns across arbitrage routing, loop protection, and outage avoidance; actual savings vary by workload.
Deploy free local Docker container ->Every structural gateway primitive is audited and validated under adversarial parallel swarm execution checks.
Holds the client connection open on provider timeout, establishes speculative standby within 300ms, and splices suffix tokens directly into the active SSE stream without client drops.
Sub-millisecond AST and trajectory cycle detection halts recursive tool loops before token budgets burn, returning HTTP 422 AGENT_LOOP_HALTED.
In-VPC prompt caching with cosine similarity threshold >= 0.95 and automated bypass regex for destructive verbs (deploy, delete, grant, refund).
Surgically catches upstream timeouts and provider 5xx errors. Swaps routes across OpenAI, Anthropic Claude, and Google Gemini with zero socket disconnect.
Rewind any agent session to any previous checkpoint without dropping the connection. Debug production failures by forking reality at the exact step that broke.
Enforces spend limits and token budgets per user session. Rejects runaway agent trajectories cleanly with standard JSON error payloads.
Listens directly on standard NestJS/Express close events. Atomic decrementing ensures zero budget state leakage on aborted client sockets.
Deploy within private cloud boundary via Docker or Kubernetes. Zero keys, prompts, or snapshots ever leave your VPC perimeter.
Audits prompt snapshots, exact models, latencies, and token spending details inside structured tables with guaranteed non-blocking shutdown drain.
Production metrics empirically audited under adversarial multi-agent parallel execution and continuous chaos test suites.
Sovereign VPS deployment blueprints, retry policies, data encryption, and SDK coordinates explained.
When an upstream LLM provider stalls or drops an active SSE stream mid-generation, standard gateways drop the client connection or force a full retry from token zero. Selixes keeps the client socket open, speculatively connects to a standby provider within 300ms, aligns the token prefix, and splices the suffix tokens seamlessly into the active connection.
Selixes inspects tool trajectory call patterns with sub-millisecond AST and Levenshtein cycle detection (22.30 µs median latency on standard 2-vCPU hardware). If an autonomous agent enters an infinite retry loop or oscillating failure trajectory, Selixes trips the circuit breaker and returns HTTP 422 AGENT_LOOP_HALTED before token budgets burn.
Selixes runs an in-VPC cosine similarity cache (configurable threshold, default >= 0.95). Prompts containing destructive or privileged verbs (deploy, delete, drop, truncate, grant, revoke, transfer, refund) automatically bypass the cache to guarantee state-modifying actions are always executed live.
Selixes catches the outage dynamically. If OpenAI returns a 5xx gateway code or times out, the gateway immediately redirects the call to your Standby Tier (such as Anthropic Claude or Google Gemini) without dropping the client socket connection.
Selixes is fully open source under the MIT license at https://github.com/selixes/gateway. You can clone the repository and launch the full stack in 60 seconds with docker compose up -d.
Yes. You can customize the retry policy in your headers. By default, Selixes will execute back-off retries on the primary provider before shifting the circuit breaker and executing standby failover.
No. When self-hosted in your private VPC, 100% of data stays inside your infrastructure boundary. No keys, prompts, or snapshots ever leave your VPC.
Yes, absolutely. Selixes is containerized via Docker and Kubernetes templates, allowing absolute private deployment on AWS, GCP, or bare metal in under 5 minutes.
Yes. All transit connections are fully encrypted using TLS 1.3. Local fallback operations are completely isolated and stored in encrypted temporary memory maps.
Yes. Because Selixes implements standard OpenAI-compatible endpoints, you simply swap the baseURL coordinate inside your LangChain LLM configuration.
Yes! This is our strongest design principle. You keep your official, standard OpenAI client library. You only swap the baseURL to point to http://localhost:4000/v1 and supply your Selixes key.
Yes. When all cloud providers are offline, Selixes boots Continuity Mode, proxying critical calls to a local edge Ollama node for graceful offline recovery.
Learn more about how Selixes protects your AI infrastructure.
Selixes is a sovereign AI reliability and cost-arbitrage gateway. It acts as a proxy between your application and AI models (like OpenAI or Anthropic). Selixes intercepts your API calls to ensure autonomous failover during outages, enforce hard token budget caps, and dynamically route requests to the most efficient model.
When you route your traffic through the Selixes Proxy, it continuously monitors upstream latency. If OpenAI experiences a 503 outage or severe latency spike, Selixes hot-swaps the request to a fallback provider (e.g., Anthropic Claude or a local Ollama model) in under 15 milliseconds, protecting your application from upstream outages.