Make Codex and Claude Code subscriptions go further: a local model router that gives routine agent work to economical models and keeps your strongest model for the hard parts.
Rust ai-agentsai-gatewayclaude-codecodexcoding-agentcost-optimizationdeepseekllm-gatewayllm-routerlocal-firstmodel-routingrusttask-routingtauri
export const DEFAULT_REQUEST_TIMEOUT_MS = 3_600_000;
export function requestTimeoutError(requestMs: number, attemptMs: number, language: 'zh' | 'en'): string | null {
if (Number.isSafeInteger(requestMs) && requestMs >= attemptMs && requestMs <= 3_600_000) return null;
const minimumSeconds = Math.ceil(attemptMs / 1000);
return language === 'zh'
? `单次请求最长等待须在 ${minimumSeconds}–3600 秒之间。`
: `The request timeout must be between ${minimumSeconds} and 3600 seconds.`;
}