docs: clarify include_partial_messages resolves 10-minute timeout error#1077
Open
jordanchendev wants to merge 1 commit into
Open
docs: clarify include_partial_messages resolves 10-minute timeout error#1077jordanchendev wants to merge 1 commit into
jordanchendev wants to merge 1 commit into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 viainclude_partial_messages=Truedoes.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_messagesdocstring 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/— passesruff format --check— cleanmypy src/— Success, no issues in 24 filespytest tests/— 985 passed, 5 skipped