Skip to content

Increase Anthropic API read timeout to 180 seconds#112

Merged
adambalogh merged 1 commit into
mainfrom
claude/read-timeout-180s-qjvhlv
Jun 26, 2026
Merged

Increase Anthropic API read timeout to 180 seconds#112
adambalogh merged 1 commit into
mainfrom
claude/read-timeout-180s-qjvhlv

Conversation

@adambalogh

Copy link
Copy Markdown
Contributor

Summary

Increases the HTTP read timeout for Anthropic API requests from 60 seconds to 180 seconds to accommodate longer response times from the Anthropic backend.

Changes

  • Renamed ANTHROPIC_TIMEOUT constant to READ_TIMEOUT for clarity (180.0 seconds)
  • Updated the httpx Timeout configuration to use the new READ_TIMEOUT constant for the read parameter (previously hardcoded to 60.0)
  • Updated the Anthropic client instantiation to use READ_TIMEOUT instead of the old ANTHROPIC_TIMEOUT constant

Details

The read timeout was increased from 60 to 180 seconds to provide more headroom for Anthropic API responses, which may take longer to generate depending on model complexity and load. The constant was renamed to better reflect its purpose as a read-specific timeout rather than a general Anthropic timeout, improving code clarity for future maintenance.

https://claude.ai/code/session_01D2q3s89NMUGT5RA4KYq8vh

…ride

Bump the shared HTTP read timeout to 180s and have Anthropic use the same
read timeout value instead of its own 120s override.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D2q3s89NMUGT5RA4KYq8vh
@adambalogh adambalogh marked this pull request as ready for review June 26, 2026 15:23
@adambalogh adambalogh merged commit 7a00028 into main Jun 26, 2026
8 checks passed
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