Skip to content

Increase server request timeout for long prompts#861

Open
zerone0x wants to merge 1 commit into
hotovo:mainfrom
zerone0x:fix/server-request-timeout-858
Open

Increase server request timeout for long prompts#861
zerone0x wants to merge 1 commit into
hotovo:mainfrom
zerone0x:fix/server-request-timeout-858

Conversation

@zerone0x

@zerone0x zerone0x commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • increase the local REST server request/response timeout from 5 minutes to 30 minutes
  • move the timeout into a small exported constant so it is covered by a focused test

Fixes #858

Tests

  • npm run test:node -- src/main/server/tests/timeouts.test.ts
  • npx eslint src/main/server/server-controller.ts src/main/server/timeouts.ts src/main/server/tests/timeouts.test.ts

Notes

  • npm run typecheck:node currently fails on main with src/main/models/providers/claude-agent-sdk.ts(243,14): Property 'aiSdkTools' does not exist on type 'ClaudeCodeSettings'.

@github-actions
github-actions Bot requested a review from wladimiiir July 9, 2026 20:12
@kilo-code-bot

kilo-code-bot Bot commented Jul 9, 2026

Copy link
Copy Markdown

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (3 files)
  • src/main/server/__tests__/timeouts.test.ts - New test file, well-structured
  • src/main/server/timeouts.ts - New constants module with clear documentation
  • src/main/server/server-controller.ts - Refactored to use imported constant

Review Notes

This PR makes a clean refactoring that:

  • Increases the server request timeout from 5 minutes to 30 minutes to handle long-running prompts
  • Extracts the timeout constant to a dedicated module for better testability
  • Adds appropriate unit test coverage for the timeout value

The changes are straightforward, well-documented, and follow good software engineering practices.


Reviewed by claude-4.5-sonnet-20250929 · Input: 37 · Output: 2.4K · Cached: 221.4K

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request extracts the server request timeout constant into a separate timeouts.ts file, increases its value from 5 minutes to 30 minutes to support long-running requests, and adds a corresponding unit test. Feedback was provided regarding a potential server crash in the timeout middleware due to duplicate timeout callbacks attempting to send headers twice.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread src/main/server/server-controller.ts
import { REQUEST_TIMEOUT_MS } from '../timeouts';

describe('server request timeout', () => {
it('allows long-running model/proxy requests for 30 minutes', () => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test does not really test anything and should be removed.

@@ -0,0 +1,2 @@
// Keep long-running local/model/proxy requests alive long enough for large-context or multimodal prompts.
export const REQUEST_TIMEOUT_MS = 30 * 60 * 1000; // 30 minutes

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No reason to have a separate file just for this constant. The constant should be eventually moved into src/main/constants.ts, but does not need to be as part of this change.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Aider-Desk has a hardcoded client-side limit of 300 seconds

2 participants