Skip to content

docs: clarify include_partial_messages resolves 10-minute timeout error#1077

Open
jordanchendev wants to merge 1 commit into
anthropics:mainfrom
jordanchendev:docs/1065-partial-messages-timeout
Open

docs: clarify include_partial_messages resolves 10-minute timeout error#1077
jordanchendev wants to merge 1 commit into
anthropics:mainfrom
jordanchendev:docs/1065-partial-messages-timeout

Conversation

@jordanchendev

Copy link
Copy Markdown

Summary

Fixes #1065.

Users hit the CLI error "Streaming is required for operations that may take longer than 10 minutes" even with a short input and a streaming-input (async iterator) prompt. The root cause is the CLI's client-side pre-flight check: it fires whenever the output token cap is high enough that a non-streaming request could exceed API_TIMEOUT_MS (default 600000ms) — independent of input size. Streaming input does not satisfy it; enabling output streaming via include_partial_messages=True does.

The SDK can't change the CLI's check, and pattern-matching its English error string to re-raise would be fragile. The surface the SDK owns is discoverability — the include_partial_messages docstring never mentioned this. This PR expands that docstring so a user hitting the error finds the fix where they'd look.

Docstring-only change; no runtime behavior changes.

Test plan

  • ruff check src/ tests/ — passes
  • ruff format --check — clean
  • mypy src/ — Success, no issues in 24 files
  • pytest tests/ — 985 passed, 5 skipped

The CLI's pre-flight check rejects requests with "Streaming is required for
operations that may take longer than 10 minutes" whenever the output token
cap is high enough that a non-streaming request could exceed API_TIMEOUT_MS,
regardless of input size. A streaming-input prompt does not satisfy it;
include_partial_messages=True (output streaming) does. Document this on the
option where users would look.

Fixes anthropics#1065

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

Streaming is required for operations that may take longer than 10 minutes

1 participant