mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-25 22:20:43 +00:00
* fix: propagate OpenRouter errors and preserve failure usage * test: cover OpenRouter errors and failure accounting * fix: bill a recovered OpenRouter failure on the success log and parse the body once A retry or fallback that recovers from an OpenRouter finish_reason error now carries the failed attempt's usage and cost into the success log, so the key pays for both calls. The response body is parsed once and handed to the error check, and the failure-log test no longer waits on a 10-second deadline * fix: carry a failed attempt's usage before each SDK retry * test: cover OpenRouter's documented failure body without usage Pins the recovered-failure test's start time to a fixed date and adds a regression test for the documented non-streaming error body, which carries no usage --------- Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| chat | ||
| image_edit | ||
| image_generation | ||
| responses | ||
| __init__.py | ||
| test_openrouter_common_utils.py | ||
| test_openrouter_embedding_transformation.py | ||
| test_openrouter_provider_routing.py | ||