Resources · Architecture
OpenQCore Runtime Architecture
System-level architecture for provider orchestration, routing control, contract normalization, and production reliability.
Runtime Architecture
A layered execution model from request ingress to deterministic response and cleanup.
API Gateway
Auth, scope validation, request shaping, and trace initialization.
Decision Router
Intent + modality classification with policy-aware route selection.
Execution Engine
Chat/Voice/Iris execution with streaming and non-stream handling.
Safety Controls
Rate limits, distributed locks, circuit breakers, and overload protection.
Persistence Layer
Session messages, dedup cache, and usage/event logging.
Provider Connectors
OpenAI, Gemini, Claude, Replicate adapters under one interface.
Contract Builder
Builds stable response envelopes for clients and downstream systems.
Provider Layer
Unified provider abstraction with policy-aware routing and fallback management.
OpenAI
Primary for chat/voice/image generation lanes.
Gemini
Multimodal reasoning and image-capable lane.
Claude
Text-focused reasoning fallback lane.
Replicate
Specialized image/video generation lane.
Provider Abstraction Router
Selects provider by capability, latency profile, reliability state, and environment policy.
Routing Matrix
Intent-driven dispatch with capability-aware primary/fallback selection.
| Intent Type | Primary Route | Fallback Route | Output Contract |
|---|---|---|---|
| Text chat | OpenAI/Claude | Gemini | Standard text envelope |
| Voice conversation | OpenAI (voice lane) | Azure/OpenAI fallback | Voice + metadata envelope |
| Image generation | OpenAI/Replicate | Replicate/OpenAI | Images array + usage + metadata |
| Video generation | Replicate video lane | Policy-defined | Videos array + metadata |
Output Contract Layer
Normalized response envelope across all providers and modalities.
{
"success": true,
"content": "...",
"provider": "...",
"usage": {},
"metadata": {},
"images": [],
"files": [],
"videos": []
}Architecture Pillars
- Unified ingress for authentication, scope, and policy validation.
- Intent-first routing with modality-aware execution strategies.
- Provider abstraction isolates vendor differences from product surfaces.
- Contract normalization ensures frontend and SDK stability.
Production Guarantees
- Deterministic cleanup for lock and pending-request tracking.
- Graceful degradation under provider or system stress.
- Traceable execution via request, session, and trace identifiers.
- Consistent response contracts across all providers.
- Operational controls designed for enterprise-scale production workloads.
