mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-29 01:03:17 +00:00
* fix(anthropic): close the Responses upstream when a bridged /v1/messages stream is closed * fix(anthropic): close the Responses upstream in sequence and close a sync upstream too Closing the bridged /v1/messages stream now closes its frames first and the Responses upstream second, the order the native Anthropic stream uses, so a close refused while another task is reading leaves that read alone. A sync Responses upstream, which has close() but no aclose(), is closed as well. * fix(responses): end a sync stream read quietly when the caller closes the stream A create stream's aclose() closes the Responses upstream while a cancelled read can still be running in a worker thread. That read used to report an OpenAI failure for a close the app made. Also annotate the new test locals with Final * fix(anthropic): close a sync Responses stream only after its in-flight read returns Closing the httpx response under a cancelled worker read made that read fail and log an OpenAI failure. The bridge now closes a sync upstream right after the read returns, so the Responses iterator keeps its existing close behavior and partial-cost logging * fix(anthropic): let the reading thread close a sync Responses stream after its in-flight read * chore: re-run pull request checks * fix(anthropic): end a create stream's read quietly once another task closes it * fix(anthropic): import SupportsAclose from stream_close, where main moved it * test(anthropic): record close-test failures with a real Logging callback, not a mock * test(anthropic): type the failure recorder callback and give the logging object a fixed start time --------- 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 | ||