Skip to content

Conversation

@arjan
Copy link
Contributor

@arjan arjan commented Dec 15, 2025

Thinking content is now properly streamed and accumulated separately from regular text content using output_index tracking. This prevents content type mismatches when OpenAI returns both reasoning and message output items in the same response.

- Add handler for response.output_item.added with reasoning type
- Add handler for response.reasoning.delta to stream thinking content
- Add handler for response.output_item.done for reasoning completion
- Enhanced response.output_text.delta to track output_index
- Add content_part_for_api handler to omit thinking content when sending to API
- Remove response.reasoning.delta from skippable events list
- Add comprehensive test coverage for all reasoning event handlers
- Add test for omitting thinking content in API conversion

Thinking content is now properly streamed and accumulated separately from
regular text content using output_index tracking. This prevents content
type mismatches when OpenAI returns both reasoning and message output items
in the same response.
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