Skip to content

Fix libcurl timeout for large prompts#1421

Draft
james-martinez wants to merge 2 commits intolemonade-sdk:mainfrom
james-martinez:fix-libcurl-timeout-10420877156247985045
Draft

Fix libcurl timeout for large prompts#1421
james-martinez wants to merge 2 commits intolemonade-sdk:mainfrom
james-martinez:fix-libcurl-timeout-10420877156247985045

Conversation

@james-martinez
Copy link
Copy Markdown
Contributor

Addresses #1364 where large prompts timed out exactly at 5 minutes due to the global timeout overriding the default behavior.

  • Changes HttpClient to default to -1 to fallback to default
  • Passes 0 to curl directly for infinite
  • Constrains --global-timeout to be minimum 300 or infinite

…meout

Co-authored-by: james-martinez <1388493+james-martinez@users.noreply.github.com>
@james-martinez james-martinez changed the title Fix libcurl timeout for large prompts by allowing 0 to be infinite ti… Fix libcurl timeout for large prompts Mar 20, 2026
@james-martinez james-martinez marked this pull request as ready for review March 20, 2026 13:28
const std::string& body,
const std::map<std::string, std::string>& headers = {},
long timeout_seconds = 300);
long timeout_seconds = -1);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Why not add a configuration option per, with global as a default if not set and then a global default of 300s?

Also, under what conditions do we really even want timeouts?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

timeouts are configurable for safety and efficiency.

@james-martinez james-martinez marked this pull request as draft March 21, 2026 03:29
@james-martinez james-martinez marked this pull request as ready for review March 21, 2026 03:29
@james-martinez james-martinez marked this pull request as draft March 21, 2026 03:29
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