Skip to content

fix: use streaming for summarizer to avoid SDK timeout ValueError#1

Open
superkaiba wants to merge 1 commit into
mainfrom
fix/streaming-summarizer
Open

fix: use streaming for summarizer to avoid SDK timeout ValueError#1
superkaiba wants to merge 1 commit into
mainfrom
fix/streaming-summarizer

Conversation

@superkaiba

Copy link
Copy Markdown
Owner

Summary

  • The Anthropic SDK now requires streaming for requests that may exceed 10 minutes
  • With max_tokens=32000 + extended thinking + web search on Opus, the SDK raises ValueError: Streaming is required for operations that may take longer than 10 minutes before the request is even sent
  • This causes all 20 paper summarizations to fail instantly, producing 0 papers in every report since the max_tokens increase (commit 82f8b6c)
  • Fix: switch from client.messages.create() to client.messages.stream() + stream.get_final_message()

Test plan

  • Trigger a manual workflow dispatch and verify papers appear in the report
  • Check that the summarizer output JSON is parsed correctly (streaming returns same message format)

🤖 Generated with Claude Code

The Anthropic SDK requires streaming for requests that may exceed 10
minutes (extended thinking + web search + 32k max_tokens on Opus).
The non-streaming client.messages.create() raises ValueError before
the request is even sent, causing all 20 paper summarizations to fail.

Co-Authored-By: Claude Opus 4.6 (1M context) <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.

1 participant