mirror of
https://github.com/Routstr/routstr-core.git
synced 2026-08-10 19:16:31 +00:00
The generic provider treated any Venice-style model_spec.pricing as authoritative after only a None check, so a native both-zero price served the model free, a negative one credited the caller on every request, and a non-numeric string threw while parsing — the outer catch then dropped the provider's entire catalog. Coerce both native prices through the resolver's _as_float and reject absent / non-numeric / negative / both-zero values, falling through to the shared litellm→OpenRouter→fail-closed chain instead. This extends the same money-safety guard the litellm and OpenRouter rungs already apply to the native source, and keeps one malformed entry from emptying the catalog. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>