mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-28 01:32:17 +00:00
fix(router): handle non-standard fallback formats with order-based fallback
When fallbacks use non-standard formats (e.g. ["claude-3-haiku"] or
[{"model": "...", "messages": [...]}]), detect them with
_check_non_standard_fallback_format and pass them through directly
instead of trying to parse with get_fallback_model_group which only
handles the standard dict-keyed format.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
08d1303c3c
commit
6fdc29a292
1 changed files with 1 additions and 1 deletions
|
|
@ -327,4 +327,4 @@ async def test_router_order_fallback_with_non_standard_fallbacks():
|
|||
messages=[{"role": "user", "content": "hi"}],
|
||||
fallbacks=["fallback-model"], # non-standard format, passed per-request
|
||||
)
|
||||
assert response._hidden_params["model_id"] == "fallback"
|
||||
assert response._hidden_params["model_id"] == "fallback"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue