mirror of
https://github.com/BerriAI/litellm.git
synced 2026-12-05 01:59:27 +00:00
* fix(anthropic): stream /v1/messages text before an internal retrieve tool call Hold-back mode buffered the whole stream behind keepalive pings whenever a server-fulfilled tool was in the request, so clients saw no text until the turn ended. Frames now stream live until the first tool_use or the end of the message, only those frames wait for the hooks, and a follow-up continues the same message with its content block indexes moved past the live ones. * fix(compression): keep the pre-tool text in the retrieve follow-up turn * fix(proxy): send the compression follow-up only the text the client already saw On a streaming request the follow-up keeps the text blocks before the first tool_use, which the client already received. A non-streaming request gets none of them, since its client only sees the follow-up's message. Ping tests now run on a virtual clock, and a frame the stream cut off starts the hold. * fix(proxy): keep a re-sent live message from repeating text the client already has A hook that returns the live message as a whole dict no longer resends the blocks already streamed, and the virtual clock test runner closes its loop the way Python 3.10 needs * test(proxy): type the gated stream and hook runner test helpers * test(messages): pin that a stream failing before any output fails its first read --------- Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| batches | ||
| chat | ||
| files | ||
| messages | ||
| pass_through | ||
| __init__.py | ||
| anthropic_docs_refusal.py | ||
| test_anthropic_common_utils.py | ||
| test_anthropic_count_tokens_transformation.py | ||
| test_anthropic_files_and_batches.py | ||
| test_anthropic_output_format_filter.py | ||
| test_anthropic_prompt_cache_prediction.py | ||
| test_anthropic_prompt_cache_pricing.py | ||
| test_anthropic_reasoning_effort.py | ||
| test_anthropic_schema_filter.py | ||
| test_anthropic_structured_output.py | ||
| test_anthropic_wif.py | ||
| test_azure_ai_cache_pricing.py | ||
| test_cost_calculation_dict_safety.py | ||
| test_count_tokens_oauth.py | ||
| test_message_sanitization.py | ||
| test_messages_http_error_retry_cases.py | ||