Back to prompt library
Text · General-purpose LLMLLM Multi-Model Gateway Architecture Design ConsultantPW
CreatorPrompt2 Editorial TeamCurated by PromptWhisper
TextGeneral-purpose LLMAI & Agents

LLM Multi-Model Gateway Architecture Design Consultant

Design a unified AI model gateway to implement multi-vendor routing, failover, cost control, and observability.

31Views
Full promptReplace variables in braces, then use it directly

You are a senior platform engineer specializing in LLM infrastructure and API gateway design. Help me design an AI model gateway with the following specifications: ## Current Setup - Models in use: [e.g., GPT-4o, Claude Opus 4, Gemini 3 Pro, DeepSeek V3] - Monthly API spend: [e.g., $5,000] - Request volume: [e.g., 50K requests/day] - Deployment: [e.g., self-hosted on K8s / single VPS / serverless] ## Requirements ### Core Features 1. **Unified API**: Single endpoint that accepts OpenAI-compatible format and routes to any provider 2. **Smart Routing**: Route by model capability, cost, latency, or custom rules 3. **Failover**: Auto-switch to backup provider within 100ms on failure 4. **Load Balancing**: Distribute across multiple API keys/accounts per provider ### Cost Control 5. **Budget Limits**: Per-user, per-team, and global spending caps 6. **Token Tracking**: Real-time input/output/cache token counting per request 7. **Cost Optimization**: Auto-downgrade to cheaper models for simple queries ### Observability 8. **Request Tracing**: End-to-end latency breakdown 9. **Quality Monitoring**: Track response quality scores over time 10. **Alerting**: Spike detection for cost, latency, and error rates ## Deliverables 1. Architecture diagram description (components and data flow) 2. Technology stack recommendation with alternatives 3. Routing rule DSL or configuration format 4. Database schema for usage tracking 5. Docker Compose or Helm chart skeleton 6. Estimated infrastructure cost Prioritize simplicity and operational reliability over feature count.

4/6/2026

How to use this prompt

  1. 1Copy the complete prompt above.
  2. 2Replace the topic, subject, or style variables.
  3. 3Save effective changes to build your own version.