diegosouzapw/OmniRoute · error
LiteLLM fetch failed [${response.status}]: ${response.status
Error message
LiteLLM fetch failed [${response.status}]: ${response.statusText} What it means
Error "LiteLLM fetch failed [${response.status}]: ${response.statusText}" thrown in diegosouzapw/OmniRoute.
Source
Thrown at src/lib/pricingSync.ts:156
// ─── Periodic sync state ─────────────────────────────────
let syncTimer: ReturnType<typeof setInterval> | null = null;
let lastSyncTime: string | null = null;
let lastSyncModelCount = 0;
let activeSyncIntervalMs = SYNC_INTERVAL_MS;
// ─── Core: Fetch + Transform ─────────────────────────────
/**
* Fetch raw pricing data from LiteLLM GitHub.
*/
export async function fetchLiteLLMPricing(): Promise<Record<string, LiteLLMModelInfo>> {
const response = await fetch(LITELLM_PRICING_URL, {
signal: AbortSignal.timeout(30000),
});
if (!response.ok) {
throw new Error(`LiteLLM fetch failed [${response.status}]: ${response.statusText}`);
}
const text = await response.text();
try {
return JSON.parse(text) as Record<string, LiteLLMModelInfo>;
} catch {
throw new Error(`LiteLLM returned invalid JSON (${text.slice(0, 100)}...)`);
}
}
/**
* Transform LiteLLM raw data → OmniRoute PricingByProvider format.
*
* Conversion: cost_per_token × 1_000_000 → $/1M tokens (OmniRoute format).
* Ingests both chat (token) AND non-token modes (image / audio / rerank /
* video / embedding). Token pricing is scaled to $/1M; non-token fields
* (per-image, per-second, per-character, search-unit, …) are carried through
* verbatim as absolute USD.
*/View on GitHub (pinned to a179ffed5b)
When it happens
Trigger: Thrown at src/lib/pricingSync.ts:156 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of diegosouzapw/OmniRoute@a179ffed5b (2026-08-25).
Data as JSON: /api/errors/653c762ea8a42480.
Report an issue: GitHub.