mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-28 00:00:38 +00:00
* fix(streaming): surface upstream abort on azure_ai, databricks, Vertex Model Garden and text completion streams * fix(streaming): keep OpenAIError for aborts on OpenAI-compatible streams Streams parsed by the OpenAI streaming handler raised the base exception on an upstream abort, so failure callbacks lost the OpenAIError class they got before. The handler now names its abort error class, and the Bedrock OpenAI-compatible decoder passes it through * fix(streaming): record partial usage when a sync stream fails mid-stream A sync stream that raised after content logged its failure with zero tokens and no spend, while the async path billed the partial output. The sync failure path now records the partial usage the same way * fix(streaming): raise the route's own error class on aborts and check azure_text streams * fix(streaming): log every upstream abort with its provider's error class Parsers raise one UpstreamAbortError, and the stream wrapper swaps it for the class the route's provider config returns before the failure log and fallback handling * fix(streaming): keep the abort error each route already raised and raise InternalServerError on the new routes Round 2 swapped the abort for each provider's HTTP error class, which renamed it on openai, azure and other SDK routes that already raised InternalServerError. The #48328 raises in the openai SDK path and the OpenAI-compatible stream parser are back as they shipped, and the shared check now runs after the provider's own parser, so only routes that never raised get the stream wrapper's InternalServerError. The shared SSE parser only validates a line that mentions abort * fix(anthropic,content_filter): end sync /v1/messages streams with an error event and release held guardrail text on upstream errors The sync Anthropic adapter swallowed every mid-stream error and stopped the stream, so a sync /v1/messages stream that hit an upstream abort ended cut short with no error. It now ends with an Anthropic error event, as the async path does. The content filter guardrail dropped the text it was holding back when the upstream stream raised. It now sends that text through its end-of-stream check before re-raising. --------- Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| audio_transcription | ||
| auth | ||
| batches | ||
| chat | ||
| decisions | ||
| embedding | ||
| files | ||
| guardrail_translation | ||
| harness | ||
| realtime | ||
| rerank | ||
| responses | ||
| search | ||
| vector_store | ||
| __init__.py | ||
| test_base_managed_resource.py | ||
| test_base_model_iterator.py | ||
| test_base_utils.py | ||
| test_managed_resource_isolation.py | ||
| test_managed_resources_utils.py | ||