Files
litellm/tests/local_testing
Krish Dholakia 78997c2e35 Anthropic - working mid-stream fallbacks (#13149)
* fix(router.py): add acompletion_streaming_iterator inside router

allows router to catch errors mid-stream for fallbacks

Work for https://github.com/BerriAI/litellm/issues/6532

* fix(router.py): working mid-stream fallbacks

* fix(router.py): more iterations

* fix(router.py): working mid-stream fallbacks with fallbacks set on router

* fix(router.py): pass prior content back in new request as assistant prefix message

* fix(router.py): add a system prompt to help guide non-prefix supporting models to use the continued text correctly

* fix(common_utils.py): support converting `prefix: true` for non-prefix supporting models

* fix: reduce LOC in function

* test(test_router.py): add unit tests for new function

* test: add basic unit test

* fix(router.py): ensure return type of fallback stream is compatible with CustomStreamWrapper

prevent client code from breaking

* fix: cleanup

* test: update test

* fix: fix linting error
2025-07-31 21:22:49 -07:00
..
2025-05-13 20:21:14 -07:00
2025-05-31 12:42:56 -07:00
2025-05-20 13:08:47 -07:00
2025-07-22 20:59:34 -07:00
2025-07-04 18:26:54 -07:00
2025-06-28 14:46:16 -07:00
2025-04-16 07:57:10 -07:00
2025-03-11 08:27:36 -04:00
2025-07-23 13:50:36 -07:00
2025-03-21 16:21:18 -07:00
2025-07-28 17:47:57 -07:00
2025-02-10 22:13:58 -08:00
2025-04-01 07:12:29 -07:00
2025-01-05 13:43:32 -08:00