A readable transcript can still be incomplete
Spring announced Spring AI 2.1.0-RC1 on October 23, 2026, adding native message-parts support to seven more integrations. The change addresses a failure that a readable transcript can hide: missing information needed to continue a tool-calling exchange. Spring’s earlier representation stored text, tool calls and media separately, preventing arbitrary interleaving. Reasoning between tool calls, for example, needs a representation that preserves its position. Sources: Spring
M1 introduced native parts in OpenAiResponsesChatModel. RC1 adds OpenAI Chat Completions, Anthropic, Google GenAI, Amazon Bedrock Converse, Ollama, Mistral AI and DeepSeek. Existing text and tool-call accessors remain available, while builder setters replace corresponding parts without leaving stale entries. Artifacts are available from Maven Central, and GitHub labels RC1 a prerelease. Applications must still check whether their stored histories retain the structure these integrations understand. Sources: Spring
Parts separate displayed content from replay state
Spring’s Chat Model reference defines six part types and exposes their ordered representation through getParts(). The table below describes each type. Convenience accessors provide narrower views: getText() joins text parts, while tool-call and reasoning accessors select their respective parts. Those views help with presentation, but a persistence design should not treat any single view as the complete message. Sources: Spring
Table
The six message part types
| Part | Information represented |
|---|---|
| TextPart | Text |
| ReasoningPart | Reasoning-related content |
| ToolCallPart | A tool invocation |
| ToolResultPart | A tool result, potentially containing multiple parts |
| MediaPart | Media |
| UnknownPart | Unmodeled provider JSON |
Consider an illustrative assistant message with signed reasoning, a lookupOrder invocation and text saying the order is being checked. Saving only the sentence loses the invocation and signature. Saving a separate tool list still leaves the relationship to the reasoning block unspecified. ReasoningPart separates display text and summaries from replay payloads, such as signatures or encrypted content. Its text can be absent, so an empty display does not mean there is no state to preserve. Sources: Spring
OpaquePayload contains a provider identifier, a kind and data; providers skip payloads they cannot replay. This gives provider-specific material a place in the message without requiring every integration to interpret it. Streaming adds another boundary: chunks contain indexes and partial markers, and MessageAggregator reconstructs complete parts. Storage tests should therefore check both reconstructed content and its accompanying metadata. Sources: Spring
Ordered storage still faces provider constraints
An ordered internal message does not guarantee that an endpoint accepts the same ordering. On Spring’s main branch, the OpenAI Chat Completions adapter joins text into content and collects invocations into tool_calls. It joins replayable reasoning into reasoning_content. This mapping excludes other assistant parts, including earlier audio output. That implementation is on main; its behavior does not establish verified RC1 replay results. Treat the change as a correctness and compatibility improvement. Do not assume gains in latency, cost or answer quality. Sources: GitHub
Migration also changes what stored messages must contain. Anthropic now returns one generation containing ordered blocks; old messages using the removed anthropicThinkingContents mechanism lose thinking blocks on replay. Gemini signatures attach to their corresponding parts, with each candidate represented as one generation. Bedrock unsigned reasoning requires a provider attribute of bedrock, while Mistral reasoning requires mistral_ai. Dropping these attributes during storage can therefore change replay behavior. Sources: Spring
Provider switching brings further constraints. OpenAI Chat Completions excludes foreign signed reasoning, and its filtering can suppress all reasoning in a message containing it. The upgrade notes also make media and tool-call accessor lists unmodifiable and change message equality to compare parts. Account for these changes in migration code and persistence assertions. Test provider switching separately, even when both integrations use the same message abstraction. Sources: Spring
DeepSeek requires a field that Groq reportedly rejected
DeepSeek’s thinking-mode documentation makes reasoning replay conditional on tools. Subsequent requests carrying tools must include complete reasoning_content, including reasoning from earlier turns without tool calls. Missing content produces HTTP 400. Without tools, previous reasoning is ignored rather than added to the next context. Discarding reasoning after displaying it therefore conflicts with DeepSeek’s documented tool-use contract. Sources: DeepSeek
Spring issue #6968 reports the opposite problem with Groq’s openai/gpt-oss-120b model on Spring AI 2.0.0, Spring Boot 4.1.0 and Java 21. The reporter used a non-streaming ChatClient.call() flow with ToolCallingAdvisor, and the first invocation returned reasoning and a tool call. The next invocation failed because the assistant message contained an unsupported reasoning_content property. The reporter said disabling reasoning generation did not prevent the failure. Removing reasoning metadata before the next iteration did. Sources: GitHub
Spring documents a serialization control: leaving replayReasoningContent unset replays reasoning when present. Setting it to false suppresses the outgoing property. The configuration below enables that suppression. It controls what the client sends. Asking a model to generate less reasoning is a separate control. Sources: Spring
spring.ai.openai.chat.replay-reasoning-content=falseReported request pairs help isolate replay failures
An OpenClaude issue presents five reported DeepSeek request cases, summarized below. Two follow-ups show the clearest comparison: including reasoning returned HTTP 200, while omitting it returned HTTP 400. That pair illustrates how losing one field can break a continuation. The two empty-text examples have incorrectly escaped nested JSON in their pasted tool arguments. Do not copy them as executable demonstrations. Sources: GitHub
Table
Reported DeepSeek replay outcomes
| Request case | Reported result |
|---|---|
| Initial request | HTTP 200 |
| Follow-up with reasoning | HTTP 200 |
| Corresponding follow-up without reasoning | HTTP 400 |
| Empty assistant text plus tool calls, without reasoning | HTTP 400 |
| Empty assistant text plus tool calls, with reasoning | HTTP 200 |
For a focused test, use a fixed tool result and change one replay variable at a time.
Test storage and outgoing requests separately
Start a replay test with a harmless deterministic tool, such as lookupOrder returning a fixed fixture. Capture an actual response, persist the conversation and reload it in a fresh process before continuing. Create three storage variants: complete structured messages, text alone, and text plus tool calls. In the third variant, remove reasoning and opaque payloads. This tests combined loss of replay state while retaining tool invocations; it does not isolate reasoning loss. To isolate a cause, remove reasoning and opaque payloads independently where the representation permits.
- Compare part order, types, tool identifiers, arguments, attributes and opaque values before and after storage.
- Replay all three storage variants against the same DeepSeek thinking-mode configuration with tools. Use the independent removal variants to isolate causes where possible.
- Repeat the selected Groq case with reasoning replay enabled and disabled, inspecting the outgoing property and continuation result.
- Compare in-memory and restarted histories, then test streaming reconstruction with fixtures encoding the same response.
For the Spring option test, vary only the replay setting shown below. The documented false setting should omit the outgoing reasoning_content property. Inspect both the request body and HTTP status. Acceptance alone cannot establish that every part survived. Record the artifact version, model, endpoint, thinking settings and tool schema. Also record response status, error body and whether access was direct or through a gateway. Sources: Spring
OpenAiChatOptions.builder().replayReasoningContent(true).build();
OpenAiChatOptions.builder().replayReasoningContent(false).build();For streaming tests, split reasoning, signatures and tool arguments across chunks of a fixed fixture. Keep empty and absent reasoning as distinct cases: the main-branch adapter sends reasoning only when StringUtils.hasText() succeeds. OpenClaude’s five-case table does not establish its proposed empty-string workaround. Assert that the restarted application sends the structured continuation its selected endpoint expects. Sources: GitHub