[PR #9] [MERGED] feat: add configurable streaming read timeout #55

Closed
opened 2026-02-27 07:17:45 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/jwadow/kiro-gateway/pull/9
Author: @Kartvya69
Created: 12/18/2025
Status: Merged
Merged: 12/18/2025
Merged by: @jwadow

Base: mainHead: feature/streaming-read-timeout


📝 Commits (2)

  • 0bdeb44 feat: add configurable streaming read timeout
  • 3f086c1 docs: add CONTRIBUTIONS.md with contributor Kartvya69

📊 Changes

5 files changed (+52 additions, -8 deletions)

View changed files

📝 .env.example (+7 -0)
CONTRIBUTORS.md (+7 -0)
📝 kiro_gateway/config.py (+7 -0)
📝 kiro_gateway/http_client.py (+17 -4)
📝 tests/unit/test_http_client.py (+14 -4)

📄 Description

Summary

Add STREAMING_READ_TIMEOUT config option to prevent premature disconnects during long-running streaming responses (e.g., tool calls, complex reasoning).

Changes

  • Add STREAMING_READ_TIMEOUT env var (default: 300s / 5 minutes)
  • Use httpx.Timeout with separate connect/read timeouts for streaming requests
  • Update tests to verify new timeout configuration

Why

During streaming, the model may pause between chunks while "thinking" (especially for tool calls or complex reasoning). The previous implementation used the same timeout for both connection and read operations, which could cause premature disconnects during these pauses.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/jwadow/kiro-gateway/pull/9 **Author:** [@Kartvya69](https://github.com/Kartvya69) **Created:** 12/18/2025 **Status:** ✅ Merged **Merged:** 12/18/2025 **Merged by:** [@jwadow](https://github.com/jwadow) **Base:** `main` ← **Head:** `feature/streaming-read-timeout` --- ### 📝 Commits (2) - [`0bdeb44`](https://github.com/jwadow/kiro-gateway/commit/0bdeb44f545f3cbca56cad7663e0a92e80bde492) feat: add configurable streaming read timeout - [`3f086c1`](https://github.com/jwadow/kiro-gateway/commit/3f086c12805cb4e575a9c6822e7a8cd0dc86a68d) docs: add CONTRIBUTIONS.md with contributor Kartvya69 ### 📊 Changes **5 files changed** (+52 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `.env.example` (+7 -0) ➕ `CONTRIBUTORS.md` (+7 -0) 📝 `kiro_gateway/config.py` (+7 -0) 📝 `kiro_gateway/http_client.py` (+17 -4) 📝 `tests/unit/test_http_client.py` (+14 -4) </details> ### 📄 Description ## Summary Add STREAMING_READ_TIMEOUT config option to prevent premature disconnects during long-running streaming responses (e.g., tool calls, complex reasoning). ## Changes - Add `STREAMING_READ_TIMEOUT` env var (default: 300s / 5 minutes) - Use `httpx.Timeout` with separate connect/read timeouts for streaming requests - Update tests to verify new timeout configuration ## Why During streaming, the model may pause between chunks while "thinking" (especially for tool calls or complex reasoning). The previous implementation used the same timeout for both connection and read operations, which could cause premature disconnects during these pauses. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 07:17:45 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/kiro-gateway-jwadow#55
No description provided.