Skip to content

Raise provider HTTP timeouts for longer generations#111

Closed
adambalogh wants to merge 1 commit into
mainfrom
claude/max-tokens-messages-47z0j1
Closed

Raise provider HTTP timeouts for longer generations#111
adambalogh wants to merge 1 commit into
mainfrom
claude/max-tokens-messages-47z0j1

Conversation

@adambalogh

Copy link
Copy Markdown
Contributor

The provider-side httpx read/write timeouts (60s) and the Anthropic client timeout (120s) bound the full generation on non-streaming paths — the plain invoke() completion path and Anthropic json_schema structured output, which returns a single buffered chunk. With max_tokens raised to 12k, a long structured or non-streaming response can exceed those ceilings and fail with a read timeout. Raise read/write and the Anthropic timeout to 300s. On the streaming path this only widens the per-chunk ceiling, with no downside.

Claude-Session: https://claude.ai/code/session_013UUr2FRtYx6JJHShAqKPDj

The provider-side httpx read/write timeouts (60s) and the Anthropic client
timeout (120s) bound the full generation on non-streaming paths — the plain
invoke() completion path and Anthropic json_schema structured output, which
returns a single buffered chunk. With max_tokens raised to 12k, a long
structured or non-streaming response can exceed those ceilings and fail with a
read timeout. Raise read/write and the Anthropic timeout to 300s. On the
streaming path this only widens the per-chunk ceiling, with no downside.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013UUr2FRtYx6JJHShAqKPDj
@adambalogh adambalogh closed this Jun 26, 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.

2 participants