You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[DOCS] Document streaming error behavior parity for the Python SDK API errors #794
The Python SDK fix in inference-gateway/python-sdk#139 makes InferenceGatewayAPIError reliably carry status_code and response_data on both the requests and httpx backends, including
for the three streaming methods (create_chat_completion_stream, create_response_stream, create_message_stream). Connection failures
during streaming calls are now also raised as InferenceGatewayError
instead of raw requests / httpx exceptions.
The README "Error Handling" section already documents the non-streaming
behavior, but it does not spell out how streaming calls behave on error.
The docs should make the streaming parity explicit so users know the
same except InferenceGatewayError / except InferenceGatewayAPIError
handling applies when iterating a stream.
Affected pages: python-sdk README "Error Handling" section (and the
docs site page mirroring it, if any).
Acceptance Criteria
The Error Handling section states that streaming methods raise InferenceGatewayAPIError with status_code and response_data
populated on HTTP errors, on both backends.
The Error Handling section states that connection failures during
streaming calls raise InferenceGatewayError (catchable with the
existing example's except InferenceGatewayError branch).
A short streaming error-handling snippet is added, mirroring the
non-streaming example.
No em or en dashes are introduced (plain hyphens only).
Open draft PR on python-sdk, mark ready when checks pass (PR 140, all checks green, ready)
Restore docs working tree, verify clean
Set board status to QA, finish
✅ Infer Result: Success
Done. The streaming error behavior is now documented, and all work is committed, pushed, and reviewable.
What changed
The issue's deliverable - the "Error Handling" section - lives in the python-sdk README, so the change landed there via inference-gateway/python-sdk#140 (inference-gateway/python-sdk#140), ready for review with all checks green (Analyze actions, Analyze python, CodeQL, Test).
The README's Error Handling section now states, matching the client behavior on both the requests and httpx backends:
The three streaming methods (create_chat_completion_stream, create_response_stream, create_message_stream) raise InferenceGatewayAPIError with status_code and response_data populated on HTTP errors.
Connection failures during streaming calls raise InferenceGatewayError, catchable with the existing example's except InferenceGatewayError branch.
A short streaming try/except snippet mirrors the non-streaming example, plus a one-line note that stream errors surface when iteration begins, so the loop itself goes inside the try block.
18 lines added to README.md, plain hyphens only, no issue references in the doc content. Commit: docs(readme): document streaming error behavior parity on branch fix/issue-794.
Scope notes
The docs site has no page mirroring the python-sdk README (verified against the sidebar - only the sdks.md quick-reference exists, which the issue's "if any" clause covers), so no docs-repo content change was needed; the docs tree here was used as the working base and restored cleanly.
Activity
edenreich commentedon Sep 25, 2026
@infer can you work on this? use /ponytail:ponytail
inference-gateway-maintainer commentedon Sep 25, 2026
Model:
ollama_cloud/glm-5.3-flash· View JobTodos
✅ Infer Result: Success
Done. The streaming error behavior is now documented, and all work is committed, pushed, and reviewable.
What changed
The issue's deliverable - the "Error Handling" section - lives in the python-sdk README, so the change landed there via inference-gateway/python-sdk#140 (inference-gateway/python-sdk#140), ready for review with all checks green (Analyze actions, Analyze python, CodeQL, Test).
The README's Error Handling section now states, matching the client behavior on both the
requestsandhttpxbackends:create_chat_completion_stream,create_response_stream,create_message_stream) raiseInferenceGatewayAPIErrorwithstatus_codeandresponse_datapopulated on HTTP errors.InferenceGatewayError, catchable with the existing example'sexcept InferenceGatewayErrorbranch.tryblock.18 lines added to README.md, plain hyphens only, no issue references in the doc content. Commit:
docs(readme): document streaming error behavior parityon branchfix/issue-794.Scope notes
sdks.mdquick-reference exists, which the issue's "if any" clause covers), so no docs-repo content change was needed; the docs tree here was used as the working base and restored cleanly.Model:
ollama_cloud/glm-5.3-flash· Exit Code:0· Duration: 9m 3sTokens: 2,287,308 in · 41,059 out · 2,328,367 total (31 requests)
Tool calls: 56 total · 100% success rate
Traces
Stats
Triggered by edenreich · Infer Action · OSS