Skip to content

stream_integrity: streaming /v1/completions that fails upstream immediately returns 200 with only data: [DONE] #126

Open

Description

@sre-helmcode

Found while working on nan-devops#642. With stream_integrity registered as a callback, a streaming /v1/completions request whose upstream fails before the first chunk (for example a context-window overflow) gets HTTP 200 with only data: [DONE]. The error is swallowed and the client sees an empty success.

Chat completions and /v1/responses are not affected. Reproducible in the real-litellm harness (the case is excluded from the #642 chain test, with a comment).

Expected: the error should surface, the same as on the non-stream path or on streamed chat.

🤖 Generated with Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions