Skip to content

feat(local): configurable request timeout (default 180s)#303

Open
julio4 wants to merge 1 commit into
JerryZLiu:mainfrom
julio4:feat/local-llm-timeout
Open

feat(local): configurable request timeout (default 180s)#303
julio4 wants to merge 1 commit into
JerryZLiu:mainfrom
julio4:feat/local-llm-timeout

Conversation

@julio4

@julio4 julio4 commented Jul 6, 2026

Copy link
Copy Markdown

Local calls use hardcoded 60s URLRequest.timeoutInterval. Because requests are non-streaming, that timer behaves as an idle timeout that must cover the model's entire generation with no keep-alive bytes to reset it.
60s can easily be reached on slower hardware especially on cold load of model, causing failures that become "Processing failed" cards.

Changes

Makes the timeout configurable via a new llmLocalRequestTimeout setting with a more generous default of 180s.

  • New OllamaProvider.requestTimeout, reads llmLocalRequestTimeout, default 180.
  • OllamaProvider+Networking.callChatAPI uses it instead of the hardcoded 60.0.

Risk / scope

  • Local-provider only: one computed property + one call-site change.

Local calls used a fixed 60s URLSession timeout. Because requests are
non-streaming, that timer is effectively an idle timeout that must cover the
whole generation, which is too tight on cold load / long prompts and causes
spurious "The request timed out." failures. Make it configurable via a new
llmLocalRequestTimeout setting, defaulting to 180s.
@julio4 julio4 changed the title local: configurable request timeout (default 180s) feat(local): configurable request timeout (default 180s) Jul 6, 2026
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.

1 participant