Repository navigation
Add chat OpenAI timeouts, stream disconnect cancellation, and worker isolation - #1844
Merged
Paul Lizer (paullizer) merged 1 commit intoOct 27, 2026
Conversation
…isolation Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Paul Lizer (paullizer)
merged commit Oct 27, 2026
11daaaa
into
paullizer-react-v2-ui
11 of 12 checks passed
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
httpx.Timeout(connect=10s,read=120sdefault,write=30s,pool=10s) andmax_retries=1defaults acrossAzureOpenAI,OpenAI,AsyncOpenAI, and Anthropic model clients, plus 30s fail-open timeouts on auxiliary history calls.document_action_timeout_seconds, default 300s / 5 minutes) with remaining-deadline per-call bounds and 50ms cancellation polling acrossexecute_document_action_chat_request()and_execute_document_action_workflow(), while preserving completed durable analysis window checkpoints on timeout./api/chat/streamcloses sync OpenAI streams inside afinally:block on exit/cancellation and automatically cancelsdetached_runningstream sessions afterstream_disconnect_grace_seconds(default 60s) if no client reattaches, while isolating chat stream workers onto a dedicatedchat_stream_executorpool (CHAT_STREAM_EXECUTOR_MAX_WORKERS = 32) and raising defaultGUNICORN_THREADSfrom8to16.request-stream-timeouts-section) under Scale > Redis & Caching in both V1 and V2 Admin Settings with range sliders (model_stream_read_timeout_seconds,document_action_timeout_seconds,stream_disconnect_grace_seconds, andmodel_call_max_retries) and worker-capacity guidance.Linked issue
N/A
Release Notes & Latest Features
Is this visible to end users?
Is this admin-facing (Admin Settings, governance, deployment, config)?
Should this become a Latest Feature card?
Screenshot needed for the card?
Version bump
application/single_app/config.pyVERSIONthird segment bumped, or not needed because this is docs-onlydeployers/version.txtbumped, or not needed becausedeployers/was not changedTesting / validation
python .\functional_tests\test_chat_openai_timeout_and_stream_resilience.py- passed (4/4 tests)python .\functional_tests\test_v2_admin_scale_parity.py- passed (17/17 tests)python .\functional_tests\test_v2_admin_scale_normalization.py- passed (13/13 tests)python .\functional_tests\test_admin_settings_fields_registry_integrity.py- passed (5/5 tests)python .\functional_tests\test_chat_content_streaming.py- passed (9/9 tests)python .\functional_tests\test_docs_app_surface_coverage.py- passed (7/7 checks)python .\functional_tests\test_docs_site_quality.py- passed (6/6 checks)python .\functional_tests\route_tests\test_route_blueprint_policy_inventory.py- passed (15/15 tests)python .\functional_tests\route_tests\test_route_unauthenticated_policy_contract.py- passed (10/10 tests)python .\functional_tests\route_tests\test_route_policy_test_coverage.py- passed (3/3 tests)python .\scripts\check_cosmos_response_boundaries.py- passed (1081 owners, 421 doubles, 0 review gaps)node --check .\application\single_app\static\js\admin\admin_settings.js- passedgit -c core.whitespace=blank-at-eol,blank-at-eof,space-before-tab,cr-at-eol diff --check- passedDocumentation
Security checklist
@swagger_route(security=get_auth_security())sanitize_settings_for_user()