Skip to content

docs(examples): Add ReasoningContent field support in streaming examples#18

Merged
edenreich merged 3 commits intomainfrom
claude/issue-17-20250820-0203
Aug 20, 2025
Merged

docs(examples): Add ReasoningContent field support in streaming examples#18
edenreich merged 3 commits intomainfrom
claude/issue-17-20250820-0203

Conversation

@edenreich
Copy link
Copy Markdown
Contributor

Fixes #17

This PR addresses the issue where reasoning_content from API responses was not being processed in streaming mode despite ReasoningFormat being set.

Changes

  • Updated examples/stream/main.go to handle both Reasoning and ReasoningContent fields
  • Updated examples/stream-tools/agent.go to handle both Reasoning and ReasoningContent fields
  • Updated README.md streaming example to demonstrate both fields
  • Maintains backward compatibility with existing Reasoning field handling

Testing

  • All existing tests pass
  • Linting passes
  • Examples build successfully

Generated with Claude Code

- Updated examples/stream/main.go to handle both Reasoning and ReasoningContent fields
- Updated examples/stream-tools/agent.go to handle both Reasoning and ReasoningContent fields  
- Updated README.md streaming example to demonstrate both fields
- Fixes issue where reasoning_content from API responses was not being processed
- Maintains backward compatibility with existing Reasoning field handling

Fixes #17

Co-authored-by: Eden Reich <edenreich@users.noreply.github.com>
@edenreich edenreich changed the title fix: Add ReasoningContent field support in streaming examples fix(examples): Add ReasoningContent field support in streaming examples Aug 20, 2025
… display and streaming support

Signed-off-by: Eden Reich <eden.reich@gmail.com>
Signed-off-by: Eden Reich <eden.reich@gmail.com>
@edenreich edenreich changed the title fix(examples): Add ReasoningContent field support in streaming examples docs(examples): Add ReasoningContent field support in streaming examples Aug 20, 2025
@edenreich edenreich merged commit 0212d7d into main Aug 20, 2025
1 check passed
@edenreich edenreich deleted the claude/issue-17-20250820-0203 branch August 20, 2025 13:44
github-actions bot pushed a commit that referenced this pull request Aug 20, 2025
## [1.11.1](v1.11.0...v1.11.1) (2025-08-20)

### 📚 Documentation

* **examples:** Add ReasoningContent field support in streaming examples ([#18](#18)) ([0212d7d](0212d7d)), closes [#17](#17)
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 1.11.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ReasoningContent not forwarded in streaming responses despite ReasoningFormat being set

1 participant