mirror of
https://github.com/Routstr/routstr-core.git
synced 2026-08-10 19:16:31 +00:00
The USD-cost path (and the litellm pricing fallback) resolved the provider fee via get_provider_for_model(model_id)[0] — the best-ranked provider for the alias, not the one that served. Settlement callers in the upstream handlers now pass their own provider_fee through adjust_payment_for_tokens / get_x_cashu_cost into calculate_cost; the string-derived fallback remains for callers without a serving provider. Configured model pricing is unaffected (the fee is already baked into cached pricing). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>