Version
2.0.0-M8 (regression from 1.1.4)
Summary
In 1.1.4, OpenAiApi.ChatCompletionMessage had an explicit reasoningContent field, and OpenAiStreamFunctionCallingHelper preserved it during streaming chunk merging.
In 2.0.0-M8, migrating to the official openai-java SDK removed both ChatCompletionMessage.reasoningContent and OpenAiStreamFunctionCallingHelper. The SDK places reasoning_content into Delta._additionalProperties, but MessageAggregator never reads it, and AssistantMessage has no field to store it.
Root cause
- 1.1.4:
ChatCompletionMessage.reasoningContent + OpenAiStreamFunctionCallingHelper handled it explicitly
- 2.0.0-M8: SDK puts reasoning in
_additionalProperties but MessageAggregator only reads content + toolCalls + media
- Even after patching
Delta to include a native reasoningContent field, reasoning-only chunks (delta with reasoning_content, no content, no tool_calls) are merged into adjacent chunks before reaching ToolCallAdvisor. Every incoming chunk already carries combined text and tool calls. Separate reasoning deltas never exist in the pipeline.
Workaround
Manual ReAct loop + OkHttp NetworkInterceptor. The interceptor tees the raw SSE byte stream before SDK deserialization, extracts reasoning_content from each data line, and emits thinking SSE events directly. This bypasses both the SDK deserialization (which drops unknown fields) and the ChatClient chunk merging (which collapses intermediate deltas).
Version
2.0.0-M8 (regression from 1.1.4)
Summary
In 1.1.4,
OpenAiApi.ChatCompletionMessagehad an explicitreasoningContentfield, andOpenAiStreamFunctionCallingHelperpreserved it during streaming chunk merging.In 2.0.0-M8, migrating to the official openai-java SDK removed both
ChatCompletionMessage.reasoningContentandOpenAiStreamFunctionCallingHelper. The SDK placesreasoning_contentintoDelta._additionalProperties, butMessageAggregatornever reads it, andAssistantMessagehas no field to store it.Root cause
ChatCompletionMessage.reasoningContent+OpenAiStreamFunctionCallingHelperhandled it explicitly_additionalPropertiesbutMessageAggregatoronly readscontent+toolCalls+mediaDeltato include a nativereasoningContentfield, reasoning-only chunks (delta withreasoning_content, nocontent, notool_calls) are merged into adjacent chunks before reachingToolCallAdvisor. Every incoming chunk already carries combined text and tool calls. Separate reasoning deltas never exist in the pipeline.Workaround
Manual ReAct loop + OkHttp NetworkInterceptor. The interceptor tees the raw SSE byte stream before SDK deserialization, extracts
reasoning_contentfrom each data line, and emitsthinkingSSE events directly. This bypasses both the SDK deserialization (which drops unknown fields) and the ChatClient chunk merging (which collapses intermediate deltas).