Production LLM API routing configuration, TTFT latency SLA (<400ms), and contribution margin failover benchmark generated by TokenMargin.dev.
export const SMART_ROUTER_CONFIG = {
slaMaxTtftMs: 400,
primary: { model: "openai/gpt-4.1", inputPer1M: 2.00, outputPer1M: 8.00 },
fallback: { model: "deepseek/deepseek-chat-v3-0324", inputPer1M: 0.24, outputPer1M: 0.79 },
retryOnStatus: [429, 500, 502, 503, 529]
};
model_list:
- model_name: production-primary
litellm_params:
model: openrouter/openai/gpt-4.1
timeout: 15
- model_name: cost-fallback
litellm_params:
model: openrouter/deepseek/deepseek-chat-v3-0324
router_settings:
routing_strategy: latency-based-routing
fallbacks: [{"production-primary": ["cost-fallback"]}]