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: "cohere/command-a", inputPer1M: 2.50, outputPer1M: 10.00 },
fallback: { model: "cohere/command-r-plus-08-2024", inputPer1M: 2.50, outputPer1M: 10.00 },
retryOnStatus: [429, 500, 502, 503, 529]
};
model_list:
- model_name: production-primary
litellm_params:
model: openrouter/cohere/command-a
timeout: 15
- model_name: cost-fallback
litellm_params:
model: openrouter/cohere/command-r-plus-08-2024
router_settings:
routing_strategy: latency-based-routing
fallbacks: [{"production-primary": ["cost-fallback"]}]