Skip to content

docs: remove outdated single-content-block note from accumulated_text#164

Open
frankgoldfish wants to merge 2 commits intoanthropics:mainfrom
frankgoldfish:docs/remove-outdated-single-content-block-note
Open

docs: remove outdated single-content-block note from accumulated_text#164
frankgoldfish wants to merge 2 commits intoanthropics:mainfrom
frankgoldfish:docs/remove-outdated-single-content-block-note

Conversation

@frankgoldfish
Copy link
Copy Markdown

Summary

Removes a stale documentation note from accumulated_text in lib/anthropic/helpers/streaming/message_stream.rb.

Change

Removes the comment:

# NOTE: Currently the API will only respond with a single content block.

from the accumulated_text method.

Why

This note was accurate at the time it was written, but has been outdated since extended thinking was introduced. When thinking is enabled the API returns a thinking block followed by a text block, i.e. multiple content blocks. The implementation already handles this correctly (it maps over all blocks and joins text ones); only the misleading comment needed removing.

🤖 Generated with Claude Code

'Sybmol' was misspelled in three @param/@return YARD doc comments in
helpers/messages.rb. Corrected to 'Symbol'.
The comment 'NOTE: Currently the API will only respond with a single content
block.' has been inaccurate since extended thinking was introduced, which
causes responses to contain a thinking block followed by a text block.
The implementation already concatenates all text blocks correctly; only
the misleading documentation note needed removing.
@frankgoldfish frankgoldfish requested a review from a team as a code owner March 18, 2026 02:28
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