mirror of
https://github.com/BerriAI/litellm.git
synced 2026-12-02 01:28:38 +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> |
||
|---|---|---|
| .. | ||
| adapters | ||
| context_management | ||
| native | ||
| responses_adapters | ||
| __init__.py | ||
| conftest.py | ||
| test_advisor_orchestration.py | ||
| test_anthropic_native_passthrough_spend_logging.py | ||
| test_caller_model_checks.py | ||
| test_convertible_blocks.py | ||
| test_reasoning_effort_fields.py | ||
| test_safeguards.py | ||
| test_stream_assembly.py | ||