fix: increase default LLM timeout to 300s for local models#144
Merged
NotYuSheng merged 2 commits intomainfrom Apr 1, 2026
Merged
fix: increase default LLM timeout to 300s for local models#144NotYuSheng merged 2 commits intomainfrom
NotYuSheng merged 2 commits intomainfrom
Conversation
The default 60s timeout was too short for local LLMs (e.g. LM Studio with Qwen2.5-14B) generating full story JSON, causing "LLM server is not responding" errors even when the model was actively processing. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Code Review
This pull request introduces a configurable LLM_TIMEOUT environment variable in .env.example and docker-compose.yml, defaulting to 300 seconds to accommodate slower local models. Review feedback points out that the implementation is incomplete because the internal application defaults in application.yml and LlmConfig.java are still set to 60 seconds, which may lead to inconsistent behavior. Additionally, it is suggested to update the documentation in .env.example to clarify that 300 seconds is a recommended value rather than the system-wide fallback.
- application.yml: change ${LLM_TIMEOUT:60} -> ${LLM_TIMEOUT:300}
- LlmConfig.java: change hardcoded fallback 60_000ms -> 300_000ms
- .env.example / .env: clarify comment — 300s is recommended, not the
internal default (they now match since application.yml is updated)
Addresses review feedback on PR #144.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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
LLM_TIMEOUTof 60s was too short for local LLMs (e.g. LM Studio with Qwen2.5-14B), causing story generation to fail with "LLM server is not responding" even when the model was actively processingLLM_TIMEOUT=300to.env.exampleanddocker-compose.yml, raising the default to 5 minutesLLM_TIMEOUTenv var if their hardware needs more timeTest plan
LLM_TIMEOUT=300in.env, restart backend withdocker compose up -d backend🤖 Generated with Claude Code