Because failover switches.
Correctover verifies.

LLM API reliability runtime. Contract validation across six dimensions — structure, schema, latency, cost, identity, integrity. Embedded in your stack with pip install.

pip install correctover Try LocalGateway →
main.py
from correctover import Client, Contract

client = Client(
    providers=["deepseek", "kimi", "openai"],
    contract=Contract(
        dimensions=["structure", "schema", "identity"],
        expected_entity="NEVER_EXIST_TOKEN",
    )
)

async for chunk in client.stream(model="gpt-4o", messages=[...]):
    yield chunk
# P50 validation: 22µs · 84 self-healing rules · <0.01% overhead
22µs
P50 Validation
84
Self-healing Rules
100
Public APIs
<0.01%
Overhead
Six Dimensions

Not just "did it respond."
Did it respond correctly?

Every LLM API call is validated across six independent contract dimensions. A 200 OK is not enough.
Structure

Response format

Valid JSON, expected fields present, no truncation mid-stream

Schema

Data contract

Types match, required fields exist, enums within bounds

Latency

Time-to-first-byte

Detect provider degradation before it becomes a timeout

Cost

Token economics

Verify billed tokens match actual usage, detect runaway billing

Identity

Entity verification

Confirm the response contains the entities you asked for

Integrity

Content coherence

Detect hallucination patterns, garbled output, encoding errors

Self-Healing

MAPE-K control loop.
Continuous, automatic.

Monitor → Analyze → Plan → Execute → Knowledge. The system learns from every interaction and adapts in real time.

84 rules, 62 high-confidence

The self-healing engine maintains 84 rules learned from real API interactions. 62 are high-confidence production rules that trigger automatically.

When a provider returns garbage, the engine doesn't just retry — it diagnoses which dimension failed, selects the right recovery strategy, and validates the result.

Failover ≠ Correctover

Every failover proxy switches providers. Correctover verifies the response is actually correct after switching. That's the difference between a wire operator and a quality inspector.

Live Output
{
  "call_count": 15,
  "heal_count": 1,
  "l3_failover_count": 1,
  "l3_failover_e2e_ms": 949,
  "mapek_decision_us": 950,
  "validation_passed": false,
  "failed_dimension": "identity",
  "entity_missing": "NEVER_EXIST_TOKEN_XYZ",
  "rules_evaluated": 84,
  "rules_high_confidence": 62,
  "overhead_pct": 0.003
}
Architecture

BYOK. Your keys, direct to provider.
We never touch them.

Correctover is not a proxy. It's an SDK that sits in your application. Your API keys go directly from your environment to the AI provider.

What this means

No token relay. No markup. No middleman. You bring your own API keys (BYOK) and Correctover validates responses locally in your process.

37 modules, 100 public APIs, zero external dependencies beyond your provider SDKs. Pure Python, ships as compiled .pyc — no source code exposure.

Available on PyPI and npm

Python 3.8+, Node.js 18+. Install in seconds, integrate in minutes.

Architecture
Your Application
    │
    ├── Correctover SDK (in-process)
    │     ├── Contract Engine (22µs P50)
    │     ├── SelfHealing Engine (84 rules)
    │     ├── CircuitBreaker (per-provider)
    │     └── BenchmarkRunner (latency/cost)
    │
    ├── DeepSeek API ←── YOUR KEY
    ├── Kimi API     ←── YOUR KEY
    └── OpenAI API   ←── YOUR KEY

# No proxy. No relay. Direct connections.
Two Products

Route traffic. Then verify.

Correctover's ecosystem starts with an open-source proxy and graduates to a reliability runtime.
Open Source · Network Layer

LocalGateway

Zero-dependency LLM API proxy with automatic fallback.
  • 9 built-in providers
  • Model name cross-provider mapping
  • SSE stream passthrough
  • Pure urllib, zero external dependencies
  • Open source — anyone can fork
Pro · Application Layer

Correctover

Contract validation and self-healing for LLM responses.
  • 6-dimensional contract validation
  • MAPE-K self-healing closed loop
  • 84 self-healing rules (62 high-confidence)
  • Circuit breaker + benchmark suite
  • Proprietary commercial license
¥99/mo Pro · View all plans →

Real numbers, not vanity metrics

13,769 PyPI monthly downloads
37 Python modules
v1.1.0 production-ready
308KB package size