mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-11 09:42:15 +03:00
resolveModelPricing() in analytics route fell back to Object.keys(providerPricing)[0] when a model had no pricing entry. For OpenRouter, the defaults layer always contributes an 'auto' record as the first key, so every :free model was charged at that arbitrary rate in the analytics dashboard. Fix: short-circuit :free models to return null before the last-resort fallback, and remove the Object.keys(...)[0] arbitrary-substitution fallback. Closes #9054 Co-authored-by: diegosouzapw <diegosouzapw@users.noreply.github.com>