Skip to content

More configurable timeout values in config.toml - #18

Open
evilJazz wants to merge 2 commits into
darksworm:mainfrom
evilJazz:main
Open

More configurable timeout values in config.toml#18
evilJazz wants to merge 2 commits into
darksworm:mainfrom
evilJazz:main

Conversation

@evilJazz

Copy link
Copy Markdown
Contributor

Following my earlier PR #15 here is another change that removes more hard-coded timeout values from the code and moves them into the config.toml.
I also de-duplicated the duration parsing logic by moving it into a new reflection-driven helper function parseDurations that reads the existing toml and newly added default struct tags. All timeouts, intervals and durations have been moved into a composite struct ProxyConfig.Durations and the code has been refactored accordingly.

This fixes an issue in conjunction with my local llama-cpp instance when running very long LLM sessions where creating an answer by the LLM might take over 10 minutes (600 seconds). llama-cpp would always show "cancel task" in the log files, causing the output to be truncated and agent to re-iterate over and over again (and the advisor-LLM in omp to get "angry" LOL).

Thank you for this project! You are saving a lot of power keeping my space-heater server "Deepthought" powered down most of the time. :D

evilJazz added 2 commits July 11, 2026 20:50
…fig values in order to support very long-running requests
…ions struct and default value tag in Config struct.
@darksworm

Copy link
Copy Markdown
Owner

Thanks for the PR — making these timeouts configurable is the right call, and the defaults matching the old hard-coded values keeps existing setups safe. A few asks before merging:

  1. Replace the reflection-based parseDurations with plain explicit parsing (or a small parse(name, value, default) helper). The match-by-field-name contract between Config and Durations fails silently — a misspelled field name drops a duration to zero with no compile error and no test catching it. Explicit code is about as short and much safer here.

  2. Formatting: the reflect import is unsorted (before crypto/tls), and the continuation line in the waitForWake timeout error lost its indentation. gofmt/goimports will fix both.

  3. Document that "0" disables a timeout in the README — that's what you'll want for your >10-minute LLM responses, since the 10m default will still cut them off.

Happy to merge after that. Thanks again!

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.

2 participants